|
| Index | Recent Threads | Unanswered Threads | Who's Online | User List | Help |
|
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 6
|
|
| Author |
|
|
Advanced Member Texas, USA Joined: Dec 8, 2003 Post Count: 3021 Status: Offline |
I've run several searches and cannot find an answer - which may mean it's not possible. Can I draw a white border around images? Even if it ends up being 10 10 10 10 - it would work, but it has to be white? I know I can always move my jpgs onto a larger, white canvas but there are about 30 of them and coding would be quicker. I also tried <img class="border"> and in my css img.border {border: 0 10 5 0 white} but that did not work, either. Can it be done? ---------------------------------------- ... |
||
|
|
Advanced Member USA Joined: Nov 27, 2003 Post Count: 6285 Status: Offline |
You got snagged! LOL Same problem I had wanting to be free of image borders in links, you have to remember you can use ANY HTML tag in CSS. Just use IMG. img{ border: 10px solid #fff; } or just img{ border-color: #fff; } |
||
|
|
Advanced Member USA Joined: Jul 21, 2003 Post Count: 749 Status: Offline |
LSW is right. Styling the <img> tag in your CSS is the way to go. If you want different width borders on different size add border-width: img { border: 10px solid #FFF; border-width: 0 10px 5px 0; } Dave ---------------------------------------- Building quality, affordable web sites worldwide - DMWebsites.com |
||
|
|
Advanced Member Texas, USA Joined: Dec 8, 2003 Post Count: 3021 Status: Offline |
Thanks Kyle and David, I got it to work - did have to stick with my img class - not ALL the images on the page nor site needed that border. What exactly was wrong with the CSS code I had tried? <img class="border"> and in my css img.border {border: 0 10 5 0 white} Was it the missing PX (or whatever unit) behind the numbers or the missing "solid"? Knowing me, I probably had a typo in "border".... ---------------------------------------- ... |
||
|
|
Advanced Member USA Joined: Jul 21, 2003 Post Count: 749 Status: Offline |
The border can only have one unit, description and color. That's why you have to use the border-width line to specify the size on the different sides. Dave ---------------------------------------- Building quality, affordable web sites worldwide - DMWebsites.com |
||
|
|
Advanced Member USA Joined: Nov 27, 2003 Post Count: 6285 Status: Offline |
Thelma, you could also simply zoom in on what image you want, say: #content #leftcolumn img{} This way only the images found inside the leftcolumn ID, which is found inside the content ID would be white. Where the img found in #masthead would not. |
||
|
|
|
|
|
Current timezone is GMT May 20, 2013 4:50:08 PM |