I have a definition list where I floated all its elements to the left. I cleared the left hand side of the definition terms in order to form rows; definitions are floated left and they should align vertically with the definition terms. They work as expected in Firefox and Chrome.
IE6 and at least one of the IE7 versions I tested move the floated definitions all the way up to the top of the definition list, completely breaking the effect.
Thank you for the warm welcome. I did try adding the clear: right but it did not work. I also tried tripping the ‘haslayout’ property by using zoom: 1 in the dl. That’s why I posted at 3:22am
Paul,
I have added a new css file with your suggestion but I still have the same problem. I am searching more bugs regarding IE and floated elements; I hope to find something. I think your suggestion is in the right track.
Paul’s an expert at this stuff, Julio, so I’m sure his solution is the right one. Your mistake is to put the global.css after your IE reset sheets. The stylesheet that comes last prevails where there is any duplication.
Thank you for spotting the mistake on the ordering of CSS files linking. It did changed stuff, but I still has some misplaced elements. See the screenshot:
I made the last change suggested by Paul and it works!
I took out the display: inline from the global css file (as opposed to the IE specific css file) because that was intended as a trick to make IE work correctly. I will leave the display: block declaration in the IE specific file anyway, as it does not hurt. When I said float: left in the global file, display: inline was set to be ignored according to the CSS rules.
Yes by rules of the CSS specs a floated element ignores the display type. However Paul gave you float:none; so basically you didn’t have it floated anymore and thus the display type matters