CSS and Explorer 6

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
mlitton
Forum Newbie
Posts: 11
Joined: Sun Sep 21, 2003 4:52 pm
Location: Sweden

CSS and Explorer 6

Post 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
djot
Forum Contributor
Posts: 313
Joined: Wed Jan 14, 2004 10:21 am
Location: planet earth
Contact:

Post 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
-
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Images in IE in quirks mode do not have padding. Use margins instead or switch to standards mode.
mlitton
Forum Newbie
Posts: 11
Joined: Sun Sep 21, 2003 4:52 pm
Location: Sweden

IE

Post 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
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post 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...
mlitton
Forum Newbie
Posts: 11
Joined: Sun Sep 21, 2003 4:52 pm
Location: Sweden

Thanks

Post by mlitton »

Thanks!

Mike
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post 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
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post 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
Post Reply