HTML and CSS Reference
In-Depth Information
I have an idea. In the future, why
don't we float the main content to the
left, rather than the sidebar to the right?
Since the main content is already at the
top, we wouldn't have to move things
around, and we get the same effect.
That's actually a great idea, but
there are a couple of issues.
On paper, this looks like a great idea. What
we do is set a width on the main content
<div> and float it to the left, and then let
the rest of the page flow around it. That
way, we get to keep the ordering of the
page and we also get two columns.
The only problem is, this doesn't result in a
very nice page. Here's why: remember, you
have to set a width on the element that you
are going to float, and if you set a width
on the content area, then its width is going
to remain fixed while the rest of the page
resizes along with the width of the browser.
Typically, sidebars are designed to be
narrower than the main content area, and
often look terrible when they expand. So,
in most designs, you want the main content
area to expand, not the sidebar.
But we are going to look at a way to use
this idea that works great. So hang on to
this idea. We'll also talk a little more about
why you'd even care what order your
sections are in.
Search WWH ::




Custom Search