6 Replies - 12222 Views - Last Post: 03 December 2009 - 11:57 AM

#1 Brianvm  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 57
  • Joined: 05-January 09

Hyperlink Image border

Post icon  Posted 15 January 2009 - 02:46 PM

I need a bit of help here. I am new to HTML and I can't figure out how to eliminate the blue border of the typical hyperlink when it is applied to an image. If someone could help me I would greatly appreciate it.

<A HREF="sun.jpg">


What code do I include to eliminate the blue border around the image?
Is This A Good Question/Topic? 0
  • +

Replies To: Hyperlink Image border

#2 Christopher Elison  Icon User is offline

  • D.I.C Head

Reputation: 39
  • View blog
  • Posts: 230
  • Joined: 29-December 08

Re: Hyperlink Image border

Posted 15 January 2009 - 02:49 PM

You could use CSS to specify no border:
<a href="http://www.google.com/">
  <img src="google.png" alt="Google" style="border: none;" />
</a>



You could also use in your CSS block/file:
a img {
  border: none;
}


Which will get rid of borders on all linked images.

This post has been edited by Christopher Elison: 15 January 2009 - 02:53 PM

Was This Post Helpful? 1

#3 Channy  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 08-January 09

Re: Hyperlink Image border

Posted 15 January 2009 - 02:51 PM

The easiest way would be:

<a href ="some url"><img src="sun.jpg" border="0"></a>
Was This Post Helpful? 0
  • +
  • -

#4 Brianvm  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 57
  • Joined: 05-January 09

Re: Hyperlink Image border

Posted 16 January 2009 - 08:05 AM

Thanks guys :^:
Was This Post Helpful? 0
  • +
  • -

#5 Arenlor  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 34
  • View blog
  • Posts: 389
  • Joined: 26-April 06

Re: Hyperlink Image border

Posted 17 January 2009 - 08:06 PM

I'd go with using an external CSS stylesheet, as then it'll be included with all images. I use border-width:0; myself, http://arenlor.com/styles.css that's my stylesheet, it doesn't do too much but it works to remove the border.
Was This Post Helpful? 0
  • +
  • -

#6 Sohail Anjum  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 02-December 09

Re: Hyperlink Image border

Posted 02 December 2009 - 08:57 PM

i want code for hyperlink on a html page,
such that "back to top " option,
Was This Post Helpful? 0
  • +
  • -

#7 ahmad_511  Icon User is offline

  • MSX
  • member icon

Reputation: 131
  • View blog
  • Posts: 722
  • Joined: 28-April 07

Re: Hyperlink Image border

Posted 03 December 2009 - 11:57 AM

Hi,
@Sohail, since your question is not related to the same problem discussed here,I think it's better to start a new topic so you can keep tracking it without interfering with others topic.
anyways,
here is what you have to do:
1- and an anchor element in the place where you want to jump to and give it a specific name
<a name="top" />

The name attribute will be a destination for a link

2- go to where you want to add that "back to top" link and add this
<a href="#top">back to top</a>

the # sign will make the link navigate within the same page to the specified anchor name

hope it helps

This post has been edited by ahmad_511: 03 December 2009 - 12:02 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1