HTML and CSS Reference
In-Depth Information
This should be enough, but we actually need to add one more rule to work around Internet Explorer 6 bugs:
* html {
left: 18%;
}
Of course, this is a very bare-bones stylesheet. You'll likely want to adjust the fonts, borders, margins, padding,
and more. That's straightforward once you have the layout in place.
Two Columns, Sidebar on Right
Moving the sidebar to the right is easy. Simply swap float: left and float: right in the two rules as
demonstrated in Listing 5.3 . Figure 5.2 shows the outcome. If you've used an external stylesheet, you don't
need to change one bit of the HTML file to change from a left to a right sidebar. That's the power of CSS and
separation of presentation from content.
Figure 5.2. A liquid two-column layout with a right sidebar
[View full size image]
 
Search WWH ::




Custom Search