![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||||||
| |||||||
|
|
Stan R. wrote: Skeleton Code, re-formatted for 72 column viewing -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= |
|
div id="wrap" div id="header" Title /div div class="spacer-v"><!-- No Content --></div You could replace that spacer by a top margin on the next div. Or a bottom margin on the previous div. |
|
div id="body" align="left" align="left" is not CSS, and not part of Strict HTML afaik. If you don't set a text-align on <body> nor a left margin on div#body, there is no need to align it left. |
|
div id="left" class="sidebar" style="width: 141px;" Move that style into the style block in the <head>, so that you can change it for all pages at once if needed. Add float:left; to those styles. |
|
Now, these are my questions: 1) Currently, as written, the #content <div> sits on the vertical plane just after the bottom of the #left <div>, though #content, through the use of margin-left, is offset to the right of #left. The question here is what is the best way to get #left and #content's top sides to be equal on the vertical plane (so that are lined up, effectively side by side, kind of like a two column <table>? Float the left column left. the right column will then automagically go up to sit next to the left column. I've considered using { float: left; } but this seems problematic as when #content's height is less than that of #left, then #left ends up over lapping the #footer <div> instead of push it's space worth like it does as written above. That's solved by giving the footer the clear property: clear:both; |
|
In a nut shell: In fig. 1, #content has a greater height then #left since #content has more, well, content ![]() In fig. 2, it's the opposite, #left has the greater height. So, hat I want to happen is the bottoms to "push" downward as much as possible to fill any void between them and #footer. I take it you want different background colours for the different columns, and to extend them all the way to the footer. There are several ways to fake that, each with its own (dis)advantages. Search Google for 'equal height columns'. |
|
Those are my questions. Again, any critiques of my base code I have written are more than welcome, as pure-CSS is sort of a new step for me, at least in the layout department (like many, I have been using CSS for years for many formatting purposes more and more.) Some comments are inline in your code :-) Use a validator to check for obvious errors: http://validator.w3.org/ - it would have found the align="left" on your div ;-) |
#2
| |||
| |||
|
|
Thank you. I only put that in when testing because for some reason, without the float, IE6 would center the #left <div>, while Mozilla and Firefox would aligned it to the left. |
#3
| |||
| |||
|
|
Els wrote: Stan R. wrote: |
|
In a nut shell: In fig. 1, #content has a greater height then #left since #content has more, well, content ![]() In fig. 2, it's the opposite, #left has the greater height. So, hat I want to happen is the bottoms to "push" downward as much as possible to fill any void between them and #footer. I take it you want different background colours for the different columns, and to extend them all the way to the footer. There are several ways to fake that, each with its own (dis)advantages. Search Google for 'equal height columns'. Will do, thank you. |
#4
| |||
| |||
|
|
It seems to me that there is no easy way to do this (arguably an advantage for <table>-based layouts, despite how improper a use it is - actually if IE supported display:table* properties, I uspect this wouldn't be as much a problem.) So, I once again find my self asking if the expects here can offer any good solution to this dilema. |
![]() |
| Thread Tools | |
| Display Modes | |
| |