Jump to content


Photo

**SOLVED** picture as link without border


  • Please log in to reply
7 replies to this topic

#1 anatak

anatak
  • Members
  • PipPipPip
  • Advanced Member
  • 406 posts
  • LocationJapan, Fukuoka prefecture, Kitakyushu City

Posted 28 September 2006 - 08:43 AM

Hello,

Can someone help me how to use a picture as a link without having borders around it ?
here is an example of what I don't want ;)

http://kyushunetwork...ge=list_picture

as you can see the pictures have a blue border around them.
How can I eliminate that border ?

thanks
anatak
takasi.8008@docomo.ne.jp
tourokum@0508.jp

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 28 September 2006 - 09:08 AM

Add this to your stylesheet:
a img {
    border: none;
}

Should remove the border from any image within an anchor tag (<a></a>)

#3 ozconnect

ozconnect
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 28 September 2006 - 09:54 AM

Even easier <img scr='fred.gif' border=0>

#4 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 01 October 2006 - 09:23 AM

The border attribute is not allowed in some versions of XHTML.

#5 anatak

anatak
  • Members
  • PipPipPip
  • Advanced Member
  • 406 posts
  • LocationJapan, Fukuoka prefecture, Kitakyushu City

Posted 02 October 2006 - 04:29 AM

Thanks for the help.
I put the border=0 in the css for the pictures and now it works

Daniel0
Can you explain how you have to do it without using border ?
or is alright to use border in a CSS ?

thanks
anatak
takasi.8008@docomo.ne.jp
tourokum@0508.jp

#6 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 02 October 2006 - 05:48 AM

It is ok to use CSS to remove borders, that is actually W3C's recommendation.

Do as wildteen said:
a img {
	border: none;
}

Or to make only specific images not have a border:
.no_border {
	border: none;
}

Then just give the image the class no_border:
<img src='some_image.png' alt='bla bla' class='no_border' />


#7 anatak

anatak
  • Members
  • PipPipPip
  • Advanced Member
  • 406 posts
  • LocationJapan, Fukuoka prefecture, Kitakyushu City

Posted 04 October 2006 - 07:53 AM

thank you daniel0
That is the way I did it.

hmm Is there a way to mark a topic as solved with the new forum soft ?


takasi.8008@docomo.ne.jp
tourokum@0508.jp

#8 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 04 October 2006 - 07:49 PM

hmm Is there a way to mark a topic as solved with the new forum soft ?

One day there will be....
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users