![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
Steve, I assure you... it IS possible. If you want to see some great examples, check out: www.csszengarden.com This site uses 1 very basic HTML file, and people submit CSS files which display it very differently. Not necessarily a good example as few of those designs produce a fluid page, and in many cases don't produce resizable text. Nice graphics, though ;-) |


#22
| |||
| |||
|
|
Lauri Raittila <lauri (AT) raittila (DOT) cjb.net> wrote: In article Steve Pugh wrote: http://steve.pugh.net/test/test62.html Works just fine in IE5+ and Gecko based browsers. Positions the footer just below the window bottom in Opera, which is very annoying but could probably be worked around. Opera correctly collapses margins, so you need to use bottom padding for content. (99% of times when you have broken design on Opera or Mozilla and can't find it, it is margin collapsing - in this case margin is collapsed outside HTML element content area.) Replace this line with #content {margin-left: 150px; margin-bottom: 20px; height: auto;} with #content {margin-left: 150px; padding-bottom: 20px; height: auto;} Not tested if it breaks on other browsers, but I think it is pretty unlikely. Yep, I discovered that myself earlier today and was meaning to post an update, but I seem to have a shortage of round tuits at the moment. With that change it works fine in IE5+, Gecko and Opera 7.21. I don't have older Operas installed for testing at the moment. I tries the padding-bottom but no success in Opera 7.11 |
#23
| |||
| |||
|
|
"Steve Pugh" <steve (AT) pugh (DOT) net> wrote in message news:4qt4rvcqqmdfvlartludbdthf6fk4glq18 (AT) 4ax (DOT) com... Lauri Raittila <lauri (AT) raittila (DOT) cjb.net> wrote: In article Steve Pugh wrote: http://steve.pugh.net/test/test62.html Works just fine in IE5+ and Gecko based browsers. Positions the footer just below the window bottom in Opera, which is very annoying but could probably be worked around. Opera correctly collapses margins, so you need to use bottom padding for content. (99% of times when you have broken design on Opera or Mozilla and can't find it, it is margin collapsing - in this case margin is collapsed outside HTML element content area.) Replace this line with #content {margin-left: 150px; margin-bottom: 20px; height: auto;} with #content {margin-left: 150px; padding-bottom: 20px; height: auto;} Not tested if it breaks on other browsers, but I think it is pretty unlikely. Yep, I discovered that myself earlier today and was meaning to post an update, but I seem to have a shortage of round tuits at the moment. With that change it works fine in IE5+, Gecko and Opera 7.21. I don't have older Operas installed for testing at the moment. I tries the padding-bottom but no success in Opera 7.11 I have noticed that the footer is in the correct position if you hit the back button and then return to the page! David BTW - this has nothing to do with cache problems - it behaved like that |
#24
| |||
| |||
|
|
I would like to know what the logic is behind this 'fix'. Surely, if margins are collapsing, wouldn't that result in the footer moving up the viewport? |
#25
| |||
| |||
|
|
In article David Graham wrote: I would like to know what the logic is behind this 'fix'. Surely, if margins are collapsing, wouldn't that result in the footer moving up the viewport? Hm. No, I think. HTML/BODY element is 100% height of viewport as specified. So as margins collapse, it makes canvas bigger than 100% of viewport as margin is added. So scrollbar is as spec says. |
|
It is not specified how collapsed margins and absolute positioning behave. As margin is actually margin of inner block, it makes some sence to count bottom from point after it. I can't see any interpretation which would make more sence. |
#26
| |||
| |||
|
|
"Lauri Raittila" <lauri (AT) raittila (DOT) cjb.net> wrote in message news:MPG.1a20803cdd53b33f989d23 (AT) news (DOT) cis.dfn.de... In article David Graham wrote: I would like to know what the logic is behind this 'fix'. Surely, if margins are collapsing, wouldn't that result in the footer moving up the viewport? Hm. No, I think. HTML/BODY element is 100% height of viewport as specified. So as margins collapse, it makes canvas bigger than 100% of viewport as margin is added. So scrollbar is as spec says. I think I don't understand how you are using the 'margins collapse' part of your reply. I understand this to refer to the way in which the distance between elements is calculated when they both have a margin set in the vertical direction example <p id="first">some text</p p id="second">some more text</p and in the css #first {margin-bottom: 10px; border: solid 2px red;} #second {margin-top: 5px; border: solid 2px blue;} There would be a gap of 10px between the two paragraphs and not 15px because vertical margins collapse and not add - if my interpretation is correct, then how does: 'So as margins collapse, it makes canvas bigger than 100% of viewport as margin is added' The link below is quite useful - it outlines bugs in Opera |
![]() |
| Thread Tools | |
| Display Modes | |
| |