?
Solved

Getting rid of the border around an image link.

Posted on 2003-02-28
11
Medium Priority
?
146 Views
Last Modified: 2010-04-09
How do you eliminate the  blue border around an image you've made a link.  I know there's a way, in HTML, to do that.  I just can't remember what the code is.

I think the image looks so much better without that border.

Thanks.
0
Comment
Question by:karlziii
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +3
11 Comments
 

Accepted Solution

by:
inudaci earned 200 total points
ID: 8044022
like this:

<a href=""><img src="" border=0></a>
0
 
LVL 17

Expert Comment

by:dorward
ID: 8044307
The border attribute is deprecated and should not longer be used, the modern way is CSS:

<head>
<title>foo</title>
<style type="text/css">
a img { border-style: none; }
</style>
0
 

Expert Comment

by:inudaci
ID: 8044515
what browser does not support the border attr?
what requires more code?

post your answers in the css area...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:dorward
ID: 8044555
a img { border-style: none; } - 29 bytes
 border="0" - 11 bytes PER IMAGE

So unless there are only two images that are links, the CSS requires less code.
0
 
LVL 1

Expert Comment

by:porcupine
ID: 8044623
I don't think the difference in size makes much of a difference when your talking about a few characters,
Also it's worth noting that the CSS code dorward refered will not be supported by IE3 which is 2% of all Internet users, that is not much but it's worth noting.

By the way to say that border="0" is deprecated is not true because most sites use it, even Yahoo! uses it.
0
 

Expert Comment

by:inudaci
ID: 8044640
whatever,
bigger chance a browser support border attr than stylesheet, and no one knows about the guy's intention of putting more than one image
0
 
LVL 17

Expert Comment

by:dorward
ID: 8044728
porcupine: Perhaps you should look up what "deprecated" means. It doesn't mean "not in common usage".

http://www.w3.org/TR/html4/struct/objects.html#adef-border-IMG

The last stats I saw suggest that IE 3 is used by about 0.02% of Internet users.

Cutting out the HTML 3.2 junk that was deprecated when HTML 4 was released makes sites easier to maintain and quicker to load.
0
 
LVL 1

Expert Comment

by:porcupine
ID: 8045146
dorward: I stand corrected, I thought deprecated meant that it was not future-proof.

And as for the 2% stat that was based on the hits to my site in the last two years, so it may not be totally acurate.

The point I was crudely trying to make is that the border attribute is ok to use and browsers will always be backwards compatible whereas older browsers will not be futer compatible.
0
 
LVL 3

Expert Comment

by:echobravo316
ID: 8046224
The easiest HTML way is this:

<img src="IMG LOCATION" border="0">
0
 
LVL 4

Expert Comment

by:crosenblum
ID: 8047015
I agree, I love css, but it isn't 100% browser supported.

I'd rather have a standards approach, except for those pages that i know for sure who the browser is.
0
 

Author Comment

by:karlziii
ID: 8048403
Thank you all for your comments.  The simple solution to my problem was offered by inudaci, first.  Thanks to all for adding to the exchange and experience.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question