![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
http://www.edbjay.com/brth_usermenu.html This page renders fine in Opera and FF, but collapses in IE8. The page validates to 4.01 strict, and the CSS validates. Why? |
#2
| |||
| |||
|
|
Jeff wrote: Ed Jay wrote: http://www.edbjay.com/brth_usermenu.html This page renders fine in Opera and FF, but collapses in IE8. The page validates to 4.01 strict, and the CSS validates. Why? Probably because validation is not sufficient. It's a little broken in IE6, looks as you wanted in IE7. Why don't you remove your wildcard margin/padding and see what happens. Did, and nada. |
|
The mix of styles is too much trouble for me to sort through, and I don't have IE8 on the computer. You are missing background images also (in IE6 too), which I find curious. I don't know what you're trying to tell me. |
#3
| |||
| |||
|
|
Jukka K. Korpela wrote: Jeff wrote: What I see in IE8 is collapsed top and bottom margins. Since everything is block level, I can't imagine why they are missing. I wonder if it is an issue with the floats, if so, overflow: hidden might fix it. It could be an issue with floats. I've seen page layout break badly on IE 8, apparently due to floats, presumably because IE 8 tries so hard to be "standard" that it's over-standard. Jeff, Jukka, thanks. It was an issue with floats, and it was my own error. If you're interested, I had: div><ul li style='float:left;'>yada</li><li style='float:right;'>yada2</li /ul></div div class=clearfloats></div |
#4
| |||||
| |||||
|
|
I've been getting away from the float clearing div and doing this (Doraymes suggestion): div style="overflow: hidden"><ul li style='float:left;'>yada</li><li style='float:right;'>yada2</li /ul></div |
|
See if that also fixes this. I don't have IE8 on hand at the moment. Not that I know why that works, or for that matter why a clearing div works. But both do prop up the box. I personally prefer the one without extraneous markup. |
|
paragraph 1 | | | +--------+ | float |--------+ image |--------+ +--------+ | | paragraph 2 | +-----------------+ |
|
paragraph 1 | | | +--------+ | float | | image | | +--------+ | |
|
paragraph 2 | | +-----------------+ |
#5
| |||
| |||
|
|
On Tue, 26 May 2009 10:59:57 -0400 "Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote in: gvh056$s1e$1 (AT) news (DOT) eternal-september.org Jeff wrote: I've been getting away from the float clearing div and doing this (Doraymes suggestion): div style="overflow: hidden"><ul li style='float:left;'>yada</li><li style='float:right;'>yada2</li /ul></div No need for the containing div. Style could be applied directly to the ul element. Works in IE8, does not in IE6 [snip] Now if you add a clearing element after the image it changes the flow so that paragraph 1 expands to fully contain the image. This works with IE6 No need to add clearing elements. [snip] Now there is an obscure feature that if you change the block formating context of the container that you can get it to "expand" contain the float. Setting its overflow property to something other than the default "visible" http://www.w3.org/TR/CSS21/visuren.html#block-formatting So setting paragraph 1 'overflow: hidden' should make it expand to encompass the float. It does, but not in IE6. Adding zoom:1; will allow IE 6 to clear the float. |
|
IE 6/7 will be more then happy to clear the floats with just zoom:1;. One could just add zoom:1; and validate as CSS3 or use conditional comments to add zoom:1; for IE 6. |
#6
| |||
| |||
|
|
In article <gvh056$s1e$1 (AT) news (DOT) eternal-september.org>, "Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote: Jeff wrote: I've been getting away from the float clearing div and doing this (doraymes suggestion): div style="overflow: hidden"><ul li style='float:left;'>yada</li><li style='float:right;'>yada2</li /ul></div Works in IE8, does not in IE6 You will find that quite often IE6 does not give this problem because somewhere along the line the browser has been tripped (against standards) into giving height to the parent by the presence of an explicit width or height. |
|
In the above example, it is true that IE6 is not affected by any overflow rule. But one fix is simply to give an explicit width (100% say) or a nominal height (say 1px) and hide this from other browsers via a conditional. This latter is enough to make an IE6 container gain enough height to cover all its floated children. http://netweaver.com.au/floatHouse/page9.php ul class="coversItsFloats" li style='float:left;'>yada</li li style='float:right;'>yada2</li /ul with, in the HEAD: !--[if IE 6] .coversItsFloats {background: #fcc; height: 1px;} ![endif]-- should do it. |
#7
| |||
| |||
|
|
Jeff wrote: Ed Jay wrote: Jukka K. Korpela wrote: Jeff wrote: What I see in IE8 is collapsed top and bottom margins. Since everything is block level, I can't imagine why they are missing. I wonder if it is an issue with the floats, if so, overflow: hidden might fix it. It could be an issue with floats. I've seen page layout break badly on IE 8, apparently due to floats, presumably because IE 8 tries so hard to be "standard" that it's over-standard. Jeff, Jukka, thanks. It was an issue with floats, and it was my own error. If you're interested, I had: div><ul li style='float:left;'>yada</li><li style='float:right;'>yada2</li /ul></div div class=clearfloats></div I've been *getting away from the float clearing div and doing this (Doraymes suggestion): div style="overflow: hidden"><ul li style='float:left;'>yada</li><li style='float:right;'>yada2</li /ul></div * See if that also fixes this. I don't have IE8 on hand at the moment.. * Not that I know why that works, or for that matter why a clearing div works. But both do prop up the box. I personally prefer the one without extraneous markup. It didn't work for me. -- Ed Jay (remove 'M' to reply by email) Win the War Against Breast Cancer. Knowing the facts could save your life.http://www.breastthermography.info- Hide quoted text - - Show quoted text - |
#8
| |||
| |||
|
|
On May 26, 11:13 am, Ed Jay <ed... (AT) aes-intl (DOT) com> wrote: Jeff wrote: Ed Jay wrote: Jukka K. Korpela wrote: Jeff wrote: What I see in IE8 is collapsed top and bottom margins. Since everything is block level, I can't imagine why they are missing. I wonder if it is an issue with the floats, if so, overflow: hidden might fix it. It could be an issue with floats. I've seen page layout break badly on IE 8, apparently due to floats, presumably because IE 8 tries so hard to be "standard" that it's over-standard. Jeff, Jukka, thanks. It was an issue with floats, and it was my own error. If you're interested, I had: div><ul li style='float:left;'>yada</li><li style='float:right;'>yada2</li /ul></div div class=clearfloats></div I've been getting away from the float clearing div and doing this (Doraymes suggestion): div style="overflow: hidden"><ul li style='float:left;'>yada</li><li style='float:right;'>yada2</li /ul></div See if that also fixes this. I don't have IE8 on hand at the moment. Not that I know why that works, or for that matter why a clearing div works. But both do prop up the box. I personally prefer the one without extraneous markup. It didn't work for me. -- Ed Jay (remove 'M' to reply by email) Win the War Against Breast Cancer. Knowing the facts could save your life.http://www.breastthermography.info- Hide quoted text - - Show quoted text - As a beginner I have a simple question (the question is simple) about floats. It seems to me that it is very difficult to get them to work as expected. Is their logic left over from old specifications or is there really a good method to what seems like madness? |
| www.richardfisher.com |
#9
| |||
| |||
|
|
As a beginner I have a simple question (the question is simple) about floats. *It seems to me that it is very difficult to get them to work as expected. * |
#10
| |||
| |||
|
|
As a beginner I have a simple question (the question is simple) about floats. It seems to me that it is very difficult to get them to work as expected. |
![]() |
| Thread Tools | |
| Display Modes | |
| |