PDA

View Full Version : Padding problem and doctype problem in ns6


Maximus - DFX
08-28-2002, 07:08 AM
Hello, I got 2 problems:

1) It seems that when I put a padding-left/right value on a style for an <a> tag ns6 and opera6 seems to widen the <a> tag rather than pad the text. This is the css i used for the tag:

a.lixL {
display:block;
text-align:left;
text-decoration:none;
font:12px verdana,sans-serif;
color:white;
background-color:#58586C;
cursor:hand;
width:120px;
border:1px solid green;
padding-left:5px;
padding-right:5px;
}

Hopefully someone can help or tell me why its doing that. In IE the text is simply padded by 5 pix on either like it should be.

2) Why does ns6 cause spaces between images when you set the doctype to xhtml (any type). If I remove the xhtml doctype, then the images are one on top of the other with no space between but when I put the doctype, the space between them occurs. Any ideas/workarounds?

mouse
08-28-2002, 08:32 AM
Do you have a link?

MCookie
08-28-2002, 08:34 AM
img {
display:block
}

and removing the <br /> tags between your images and putting them on one line removes the spaces.

and maybe putting a margin on your a tag works better then setting a padding.

jkd
08-28-2002, 12:05 PM
Originally posted by Maximus - DFX
2) Why the hell does ns6 cause spaces between images when you set the doctype to xhtml (any type). If I remove the xhtml doctype, then the images are one on top of the other with no space between but when I put the doctype, the space between them occurs. Any ideas/workarounds?

Yeah, don't rely on the incorrect behavior of other browsers. This is due to a section of the CSS2 box model specs that only Mozilla interpretted correctly:
http://devedge.netscape.com/viewsource/2002/img-table/

Maximus - DFX
08-29-2002, 12:35 AM
Ya I'll try the img{display:block} and hopefully it works. I have already seen a lot of html's quirks so I know that it has to all be on one line with no breaks.

Maximus - DFX
08-29-2002, 12:40 AM
I'm reading though that link you gave and its quite informative. I just have a thought though, why are they trying to hard to get CSS3 to fix the problem rather than setting an HTML rendering standard since its not supposed to have the extra spaces anyway?