deltahawk12 Posted August 16, 2006 Share Posted August 16, 2006 hey everyone, ive got a small issue that proboly easy to fix. Im linking my banner to my mainpage so that when you click on it; it brings you back to the main page. know that works its as easy as pie but im stuck with the css portion of it. Im trying to remove the colored border the image links leave behind. I know about pseudo-class. and how you need to use a:link and a:visited to style the links but im not sure what to use to get rid of the border around the image. any help would be great. Link to comment Share on other sites More sharing options...
aspnetguy Posted August 16, 2006 Share Posted August 16, 2006 you can use either of these methods.1. place border="0" into the <img> tag.2. use this cssa img{border:0px} Link to comment Share on other sites More sharing options...
deltahawk12 Posted August 16, 2006 Author Share Posted August 16, 2006 hey everyone, ive got a small issue that proboly easy to fix. Im linking my banner to my mainpage so that when you click on it; it brings you back to the main page. know that works its as easy as pie but im stuck with the css portion of it. Im trying to remove the colored border the image links leave behind. I know about pseudo-class. and how you need to use a:link and a:visited to style the links but im not sure what to use to get rid of the border around the image. any help would be great.The border="0" worked but i want to use css such that my html file is getting abit big to add that code everywhere. I tried the a:img. but it didnt work this is what i did a:img{border:0px;} Whats wrong with it? Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 16, 2006 Share Posted August 16, 2006 (edited) What aspnetguy said. But using the pseudo-class you mentioned, you have power in controlling the border of that image between the link states. If you remove the border from the image when its link is in "link" state, you could still have a border for the image when link is in "hover" state. I just mean to say, you can remove the border from the image in all link states, just by this css:a img { border:0; }(syntax differes from that of above, but means the same)But you can also define only the removal of the border when in eg hover state, by this:a:hover img { border:0; }Or even only the active and visited but not the hover:a:visited img, a:active img { border:0; }a:hover img { border:solid 2px rgb(150,150,150); }You can make every difference between the states you like. [*Edit:]Remove the colon between the A and IMG elements, it is only needed between an element and a pseudo-class Leaving a space there means every IMG tag inside an A element. Edited August 16, 2006 by Dan The Prof Link to comment Share on other sites More sharing options...
deltahawk12 Posted August 16, 2006 Author Share Posted August 16, 2006 o okay gotcha it works and i understand what you mean, thanks Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 16, 2006 Share Posted August 16, 2006 You're welcome Link to comment Share on other sites More sharing options...
aspnetguy Posted August 16, 2006 Share Posted August 16, 2006 The border="0" worked but i want to use css such that my html file is getting abit big to add that code everywhere. I tried the a:img. but it didnt work this is what i did a:img{border:0px;} Whats wrong with it? I did not write "a:img" I wrote "a img" Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 16, 2006 Share Posted August 16, 2006 Too late, already solved hihi Link to comment Share on other sites More sharing options...
aspnetguy Posted August 16, 2006 Share Posted August 16, 2006 Too late, already solved hihiActually you were too late he just implemented my solution wrong...if you want to get technical Link to comment Share on other sites More sharing options...
Jack McKalling Posted August 16, 2006 Share Posted August 16, 2006 Darn, still I made it working for him, though you already said it Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now