Page 1 of 1
CSS and Explorer 6
Posted: Thu Nov 18, 2004 5:19 pm
by mlitton
Hi,
This is kind of urgent :). Why does not Explorer 6 understand code like:
In css-file:
.button_style {
padding-top:3px;
padding-bottom:4px;
padding-right:8px;
padding-left:8px;
}
Also, why do cells in a table (containing menu-images) gain some extra whitespace below themselves even thou I've set the correct height, padding to zero and cellspacing/padding equal to zero.
http://nitordesign.se/biobank/datamanagement.php has all these problems in explorer 6 but not in any other browser.
Thanks!
Mike
Posted: Thu Nov 18, 2004 5:58 pm
by djot
-
Hi,
1. Where do you use class "button_style"? It's not shown in the page source.
2. Which "button" do you mean?
3. The page provided looks the same in Opera and IE on my maschine.
djot
-
Posted: Thu Nov 18, 2004 6:18 pm
by Weirdan
Images in IE in quirks mode do not have padding. Use margins instead or switch to standards mode.
IE
Posted: Fri Nov 19, 2004 1:38 am
by mlitton
Ok, but the cells that contain them shoudl have right? Am I mistaken to think that you can remove whitespace around a image by reducing the margins of the cell around it to zero?
I've fixed the problem now. It looks great in all browsers.
Mike
Posted: Mon Nov 22, 2004 11:38 am
by Maugrim_The_Reaper
IE, Firefox, etc. CSS and it's rendering varies among most. One other fix for IE at least is to give the block element surrounding the image the style:
style="display: inline;"
This usually removes the bottom space beneath images. Firefox ignore this incidentally.
Also on Firefox, do not give the img a style or class attribute - this adds in extra space for some inexplicable reason...
Thanks
Posted: Mon Nov 22, 2004 1:09 pm
by mlitton
Thanks!
Mike
Posted: Tue Nov 23, 2004 4:09 am
by Maugrim_The_Reaper
Should solve most issues - unfortunately Firefox insists on some space below the image - to my knowledge there is no way around this. None I've found so far any...
Any day now all the browsers will converge and handle everything in the exact same way...lol
Posted: Tue Nov 23, 2004 5:55 am
by Weirdan
Maugrim_The_Reaper wrote:Should solve most issues - unfortunately Firefox insists on some space below the image - to my knowledge there is no way around this.
In standards mode Firefox assumes images to be inline elements (aligned to the baseline), thus it must leave some space below them. Usually assigning display:block style to the image itself solves this. Take a look:
http://www.quirksmode.org/css/modes/img ... trict.html (visit Quirks mode link there as well). More details available here:
http://www.quirksmode.org/css/quirksmode.html