Help - Search - Members - Calendar
Full Version: Can't Make Border Around Picture!
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
stockguy15
Hi, I'm wondering how I can make a really tiny border around my flag photos on my blog... I tried to use the border="1" feature in the img src but it still doesn't work. I actually took some code that allowed me to roll cursor over the pic to show a description. Does anyone know how to fix this?? My blog is http://www.distressedvolatility.com. Thanks so much.

Here's the top of the code used

<div style="padding:10px 10px 10px 10px;text-align:center;">

<a href="http://translate.google.com/translate?u=http%3A%2F%2Fwww.distressedvolatility.com&hl=en&ie=UTF-8&sl=en&tl=ar" title="Translate English to Arabic"><img border="1" style="cursor:pointer; cursor:hand;" width="24" alt="Translate English to Arabic" src="http://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Flag_of_Jordan.svg/250px-Flag_of_Jordan.svg.png" height="18" title="Translate English to Arabic"/></a>

<a href="http://translate.google.com/translate?u=http%3A%2F%2Fwww.distressedvolatility.com&hl=en&ie=UTF-8&sl=en&tl=zh-CN" title="Translate English to Chinese (Simplified)"><img border="1" style="cursor:pointer; cursor:hand;" width="24" alt="Translate English to Chinese (Simplified)" src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Flag_of_the_People%27s_Republic_of_China.svg/100px-Flag_of_the_People%27s_Republic_of_China.svg.png" height="18" title="Translate English to Chinese (Simplified)"/></a>
pandy
The HTML border is overridden by your style sheet.

CODE
a img {
border-width:0;
}


Which is better written like this BTW.

CODE
a img   { border: none }


If you give the DIV the flag images are in an id, for example 'flags', you can use that in a selector to style the flags.

CODE
#flags img   {/*styles*/ }
stockguy15
hmm thanks, I'll try to fix it, but I think I made it so it looks good w/out borders.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.