I use left and right float to position the sidebar and the main content and the percents to define their widths.

I am do not think this method is right or least a poor method, I don't understand how to create spacing between content boxes and make there widths take up the page without using percent width, when I use percent width that add up to 100% an then put border around the content boxes in order to space them out the content just drops down. What are good methods when creating the content area?, Like ones that have sidebars.

1 answer

This was chosen as the best answer

Your method of floating divs is correct.

You can make the page a fixed width and use pixels instead of percentages for the width.

Adding a border to an element adds 1px (or however wide your border is) to the outside of the element so if you are using the border style keep in mind that it will add space to that container and your width for it should take that into account. You could use the outline style that doesn't add space instead of border but it isn't supported in all browsers.

To add space between your floated elements, add margin or padding to the sides of the containers.

Answered over 8 years ago by Artistic Abode