Aditya R
Aditya R

Reputation: 383

CSS border not working in IE6

I have a css class (given below). The border element is working fine in firefox, it creates a 6px white border around the image. But in IE(6) it is not creating any border ie only displays the image. Pls help me out I need to figure it out quickly.

.pimage2 {
    background:url(../images/img2.gif) no-repeat;
    width: 469px;
    height:203px;   
    border:7px solid #ffffff;   

}

Thanks, Aditya

Upvotes: 2

Views: 1698

Answers (3)

Aman Fangeria
Aman Fangeria

Reputation: 11

To get the border in the latest css version, you have to write border-style first then the rest of the attributes or design of the border is considered.

border:blueviolet;
border-width: 0.5px;
border-style:solid;

Or, the border will not render.

Upvotes: 0

random
random

Reputation: 9955

According to your comment, you're using the CSS on a table cell like this:

<td class="pimage2"></td>

But IE6 won't see this and you won't be able to get the border to show.

To get the border around it, just add a non-breaking space entity in the table cell. Like so:

<td class="pimage2">&‎nbsp;</td>

Upvotes: 1

Asinox
Asinox

Reputation: 6865

maybe with black color: ?

border:7px solid #000;  

Upvotes: 0

Related Questions