Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Trying to create a 3 column layout

Featured Replies

Hey everyone i am trying to create a 3 column layout with a main section of 550 and the left and right both 275px in width. The page stretches across 1100. However it does not seem to be working and appears all messed up, am sure its something simple but not sure what, the main section seems to have some black line around it too. The web address is http://www.cherrietestingwebsite.com/ Any help appreciated a lot, thanks.

How is it that you always create duplicates of all the topics you make?

 

To fix your issue, the mainsection div needs to be floated as well. Doing so corrects position of the three blocks, but If the content seems to overflow the section divs, it's because of the styling on the <p> tags within them. Get rid of the width property and the paragraphs should be within their boundaries again.

Edited by Pete Prosper

  • Author

Hey that did work thanks but now my text in the left and right section moves down with the main content and my border seems to go slightly thicker at the bottom. I don't know how i keep double posting i only hit post once so am really not sure what is going on there :)

right first problem

your html document reads like this

 

<div id="mainsection">
<p>Hey this will be the main section for the following website clan caterers.</p>
<p>Hey this will be the main section for the following website clan caterers.</p>
<p>Hey this will be the main section for the following website clan caterers.</p>
<p>Hey this will be the main section for the following website clan caterers.</p>
<p>Hey this will be the main section for the following website clan caterers.</p>
<p>Hey this will be the main section for the following website clan caterers.</p>
</div>

<div id="leftsection">
<p>Hey this will be the left section for the following website clan caterers.</p>
</div>
<div id="rightsection">
<p>Hey this will be the right section for the following website clan caterers.</p>
</div>
</div>

 

so its reading your main section first, then the left, then the right.

 

move the leftside above the main section to start with

browser reads down the page left to right, as you would read a book. bear that in mind

remove margin: 0px auto from the main section -that centers it.

you dont want it to center,

other than the holding container, everything should have a set width and a float: left;

this will put everything together like building blocks.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.