5 replies [Last post]
vdonatiello
Offline
Regular
nanning - china
Last seen: 16 years 7 weeks ago
nanning - china
Timezone: GMT+8
Joined: 2003-10-26
Posts: 12
Points: 0

.abc {
border:1px solid #666666;
padding:0px 10px;
background-color:white;
}

<div class="abc">
some text
</div>

is ok on IE6 but the border seems not to be applied on IE5

is that correct? is there any trick?

Thanks for your time

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 days 16 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

border in IE5???

Hi vdonatiello,
It should work, with the border shorthand you should specify the border-style and width as you have done.

Could something else be causing the problem?

vdonatiello
Offline
Regular
nanning - china
Last seen: 16 years 7 weeks ago
nanning - china
Timezone: GMT+8
Joined: 2003-10-26
Posts: 12
Points: 0

border in IE5???

doctype> html 4.01 strict

here is the exact HTML and CSS code:

<div class="footer">
<span class="button"><a href="javascript:window.close();">close window</a></span>
</div>

...
.footer {
border-top:1px solid #666666;
text-align:right;
padding:10px;
height:30px;
}
.button, .button a, .button a:link, .button a:visited, .button a:hover, .button a:active {
border:1px solid #666666;
padding:0px 10px;
background-color:white;
color:#666666;
text-decoration:none;
}
...

on IE6 no problem, but on IE5/Win the border and the padding is NOT taken into account, while last 3 attributes (background, text-decoration and color are OK)

thanks very much for your time

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 days 16 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

border in IE5???

Hi vdonatiello,
I can't see why the border isn't working.
With padding IE5 on windows only pads: body, div, iframe, marquee, table, td, textarea, and tr.

Hope that helps

vdonatiello
Offline
Regular
nanning - china
Last seen: 16 years 7 weeks ago
nanning - china
Timezone: GMT+8
Joined: 2003-10-26
Posts: 12
Points: 0

border in IE5???

i had a flash ...

does the border apply to inline and block elements or only to block elements???

thanks for your time

NikLP
Offline
newbie
Last seen: 15 years 40 weeks ago
Joined: 2004-03-08
Posts: 3
Points: 0

border in IE5???

You should perhaps try changing the order of arguments to the border: attribute. I *think* I read somewhere that you need to put them in a specific order:

border: solid 1px black;

etc. You should also check w3schools.com/css and read the section on borders as it explains some of the incongruities of the browsers and their rendering of browsers. There's loads of little hacks about putting border-style: attribs in, etc.

If I just suck, sorry. I tried! Smile

Nik