...

View Full Version : Simple Border Issue



Technique
10-22-2006, 10:59 PM
I've got an image that I'm trying to had a colored border around. My first question is if I'm better off using HTML or CSS for this. Here's the code I'm working with...

<div id="tournament_spotlight"><img src="http://img244.imageshack.us/img244/3176/spotlightvv1.jpg "width="109" height="92" border="1" hspace="10" vspace="10"/>
</div>

and the css...

#tournament_spotlight {
position:absolute;
background-image: url(http://img301.imageshack.us/img301/1381/tournamentspotlightrp2.jpg);
left:135px;
top:371px;
width:409px;
height:114px;
}

I tried using bordercolor="#828282" and even a CSS class to define the border on a separate CSS page, but neither worked. Any idea?

VIPStephan
10-22-2006, 11:08 PM
Use CSS for that:


#tournament_spotlight img {border: 1px solid #828282;}

Technique
10-22-2006, 11:41 PM
Oh, I was unaware that I'd have to add img after the #tournament_spotlight div. Thanks again VIPStephan.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum