How to remove a link border?

CSS border-style: none NOT working?

  • I have to convert a simple HTML webpage to comply with XHTML 1.0 STRICT so the html tag border="0" does not pass, and I am trying to simply remove a border from my image link for my icon showing my page passed the w3 validation...and it will not remove! I have tried using an id, using the body, and using the img in my css page and none will work. Any ideas? Here is an example of 1 thing I have tried: HTML: <p> <a href="http://validator.w3.org/check?uri=... src="http://www.w3.org/Icons/valid-xhtml... alt="Valid XHTML 1.0 Strict" height="31" width="88" id="valid"/></a> </p> CSS: #valid {border-style: none}

  • Answer:

    "img.a {border:0;}" is NOT the way to do it. CSS: * { margin: 0; padding: 0; border: 0; } a img { border: 0; text-decoration: none; } That will remove borders and underlines from images used as links. The Universal Selector will reset browsers. Put it at the very top of your CSS file. Ron

inkindulgence at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

There's a couple ways to do it... img.a {border:0;} should work in your CSS. ...

D

There's a couple ways to do it... img.a {border:0;} should work in your CSS. ...

GuyOnEarth

"img.a {border:0;}" is NOT the way to do it. CSS: * { margin: 0; padding: 0; border: 0; } a img { border: 0; text-decoration: none; } That will remove borders and underlines from images used as links. The Universal Selector will reset browsers. Put it at the very top of your CSS file. Ron

Shadow Knows

You can't remove it, because the SOURCE image from w3.org HAS a border in the image itself! Don't include images of pieces of code from other servers on your site: use your own. Get the image onscreen. Make a screen capture. Edit the image, crop it, remove borders, saveit as a jpeg and put it onyour server. Now, you will have: <p><img src="mylabel.jpg" /></p> Now, you can add or remove any kind of border you want. And, if the server at validator.w3.org is down, you will STILL have an image! BTW, placing a "w3 validated" label on your site means your site is pretty basic, semi-static and, usually, poorly designed. It gives you a false confidence on the quality of your work and, for a professional, tells that you are a beginner. NO "serious" or complex site will validate. Try validating Y!A, or Facebook! Validate at start if you want, then forget about it. There are too many elements that will NOT validate, but will work on all browsers. You will ALWAYS have to fail validation if you want your site to work properly on ALL browsers...

just "JR"

You can't remove it, because the SOURCE image from w3.org HAS a border in the image itself! Don't include images of pieces of code from other servers on your site: use your own. Get the image onscreen. Make a screen capture. Edit the image, crop it, remove borders, saveit as a jpeg and put it onyour server. Now, you will have: <p><img src="mylabel.jpg" /></p> Now, you can add or remove any kind of border you want. And, if the server at validator.w3.org is down, you will STILL have an image! BTW, placing a "w3 validated" label on your site means your site is pretty basic, semi-static and, usually, poorly designed. It gives you a false confidence on the quality of your work and, for a professional, tells that you are a beginner. NO "serious" or complex site will validate. Try validating Y!A, or Facebook! Validate at start if you want, then forget about it. There are too many elements that will NOT validate, but will work on all browsers. You will ALWAYS have to fail validation if you want your site to work properly on ALL browsers...

just "JR"

If you are a novice in landscaping then this https://tr.im/dm18f is your location due to the fact you will receive data from scrap. While a lot of other such sources do not provide this kind of variety of facility simply because they deal absolutely everyone on the exact same scale as a whole with Ideas 4 Landscaping you have the possibility to actually discover landscaping. Furthermore , it also assists Those who are interested in landscaping but they keep on wasting their cash for - it saves your funds. Ideas 4 landscaping is the greatest way to get informed of what to do and how to do. No other way can take its area.

ute

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.