dmccabe Posted March 6, 2008 Share Posted March 6, 2008 This is a really basic question I am sure, but for some reason my brain is not functioning today. I have an image at the top of my page that is link back to home page, but because the other links in the page have a colour assigned to them, then this image is getting a coloured border round it. He is the CSS: a:active { font-family: Verdana; font-size: 8pt; color: #800000; text-decoration: none} a:hover { font-family: Verdana; font-size: 8pt; color: #800000; text-decoration: overline underline } a:link { font-family: Verdana; font-size: 8pt; text-decoration: none; color: #800000; border: 0;} a:visited { font-family: Verdana; font-size: 8pt; text-decoration: none; color: #800000; border: 0;} a:visited:hover { font-family: Verdana; font-size: 8pt; text-decoration: overline underline; color: #800000; border: 0;} body { font-family: Verdana; font-size: 8pt } html { font-family: Verdana; font-size: 8pt } table { font-family: Verdana; font-size: 8pt } option { font-family: Verdana; font-size: 8pt } input { font-family: Verdana; font-size: 8pt } textarea { font-family: Verdana; font-size: 8pt } h4 { align: center; font-family: Verdana; font-size: 8pt } h3 { align: center; font-family: Verdana; font-size: 12pt } h3.a { font-family: Verdana; font-size: 12pt } h1 { align: center; font-family: Verdana; font-size: 18pt } .imgblock a { align: center; text-decoration: none; } And here is the section with the image link: <br /><div class="imgblock"><a href="/phonebook/" Title=" Staff Phone Book" Alt=" Staff Phone Book"><img src="./images/pbooklogo.png" Title="Company Phone Book" Alt="Company Phone Book"></a></div><br /><br /> [code] As you can see I have tried to create a class called "imgblock" and then remove all formatting in the css file for that class, but it hasnt worked ? [/code] Quote Link to comment Share on other sites More sharing options...
calabiyau Posted March 6, 2008 Share Posted March 6, 2008 Try .imgblock a img {border: none;} or is it .imgblock a img {border: 0;} This is a really basic question I am sure, but for some reason my brain is not functioning today. I have an image at the top of my page that is link back to home page, but because the other links in the page have a colour assigned to them, then this image is getting a coloured border round it. He is the CSS: a:active { font-family: Verdana; font-size: 8pt; color: #800000; text-decoration: none} a:hover { font-family: Verdana; font-size: 8pt; color: #800000; text-decoration: overline underline } a:link { font-family: Verdana; font-size: 8pt; text-decoration: none; color: #800000; border: 0;} a:visited { font-family: Verdana; font-size: 8pt; text-decoration: none; color: #800000; border: 0;} a:visited:hover { font-family: Verdana; font-size: 8pt; text-decoration: overline underline; color: #800000; border: 0;} body { font-family: Verdana; font-size: 8pt } html { font-family: Verdana; font-size: 8pt } table { font-family: Verdana; font-size: 8pt } option { font-family: Verdana; font-size: 8pt } input { font-family: Verdana; font-size: 8pt } textarea { font-family: Verdana; font-size: 8pt } h4 { align: center; font-family: Verdana; font-size: 8pt } h3 { align: center; font-family: Verdana; font-size: 12pt } h3.a { font-family: Verdana; font-size: 12pt } h1 { align: center; font-family: Verdana; font-size: 18pt } .imgblock a { align: center; text-decoration: none; } And here is the section with the image link: <br /><div class="imgblock"><a href="/phonebook/" Title=" Staff Phone Book" Alt=" Staff Phone Book"><img src="./images/pbooklogo.png" Title="Company Phone Book" Alt="Company Phone Book"></a></div><br /><br /> [code] As you can see I have tried to create a class called "imgblock" and then remove all formatting in the css file for that class, but it hasnt worked ? [/code] Quote Link to comment Share on other sites More sharing options...
calabiyau Posted March 6, 2008 Share Posted March 6, 2008 If that doesn't work, try an inline style within your img tag <img src="" style="border: none;"/> Quote Link to comment Share on other sites More sharing options...
haku Posted March 6, 2008 Share Posted March 6, 2008 Inline styles should be avoided. They aren't good programming. Quote Link to comment Share on other sites More sharing options...
dmccabe Posted March 6, 2008 Author Share Posted March 6, 2008 Excellent: .imgblock a img { border: none; align: center; text-decoration: none; } Did the trick nicely ... thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.