IE6 doubles the left or right margin depending on the direction of the float. For example .itemsubtitleleft is floated left and it has a left margin applied to it so the margin is going to get doubled. Vice versa for the the right subtitle. The solution is to add
Code:
display:inline;
to the CSS for those classes. Doing so fixes the double margin bug but has no effect on any other browser because by default a floated element becomes a block level element.
Last edited by _Aerospace_Eng_; 11-05-2006 at 03:33 PM.
What doctype are you using? If no doctype is used, IE is in quirks mode and renders your example in the way you describe - would suggest an HTML 4.01 Strict doctype if you are not using one.
Um.... I have put the strict doctype to my page. But now, in Firefox, every image, regardless of its height, it takes up a whole line height. I can't get a image to be placed right below another image anymore when the image has a height that is smaller than a line.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Okay.... when I tried to validate my code, the strict doctype told me that I cannot use border="0" in my image tag. But the image is a link, and I do not want a border around it. I tried putting "border: 0px none;" style for the images, but the border still shows.
Is there anyway to remove the border of the image link? or do I need to change the doctype to transitional?
Bookmarks