Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » General Discussions » General Discussion » Internet Explorer 7 troubles.
Re: Internet Explorer 7 troubles. [message #235589 is a reply to message #235380] Sat, 23 December 2006 13:17 Go to previous messageGo to previous message
light is currently offline  light
Messages: 988
Registered: January 2005
Karma:
Colonel
Simple 2 column layout:

HTML
<div id="sidebar">
</div>
<div id="main">
</div>
<div id="footer">
</div>


CSS
#sidebar {
    float:right;
    width:150px;
}
#main {
    float:right;
    width:635px;
}

#footer {
    clear: both;
}


This uses two floats and a clear. The floats the sidebar to the right, then floats the main to the right also, and as the widths are specified, they can fit next to each other.

As the page is rendered in order, the sidebar and main are in place when the footer is to be rendered, it seens that it's supposed to go below both of them and does so.

The cool thing about this is if you change it to float: left for both, then the layout switches and it took you 5 seconds to do.

(Oh, don't get thrown off by ids and classes. ids can only be used once, and have a # not a . before their name in the stylesheet. Classes can be re-used, which you've probably already guessed. I use ids for elements that will only ever appear once in a page, like the header etc.)


http://www.azupload.com/displayImage.php/setid2745.png

[Updated on: Sat, 23 December 2006 13:18]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: w3d viewer movies?
Next Topic: Addressed to local folks (that live somewhat close from or in Ottawa)
Goto Forum:
  


Current Time: Sun Nov 17 05:08:13 MST 2024

Total time taken to generate the page: 0.01066 seconds