Author Topic: Image Border Links  (Read 189 times)

Thanol

  • Newbie
  • *
  • Posts: 0
    • View Profile
Image Border Links
« on: January 25, 2004, 10:41:00 am »
Add style=\"border-color: #00ff00;\" into the image tag.

cardesign

  • Newbie
  • *
  • Posts: 0
    • View Profile
Image Border Links
« Reply #1 on: January 25, 2004, 10:49:00 am »
would that make it stay the same colour once it is linked though

Thanol

  • Newbie
  • *
  • Posts: 0
    • View Profile
Image Border Links
« Reply #2 on: January 25, 2004, 10:54:00 am »
Yes, it should.

cardesign

  • Newbie
  • *
  • Posts: 0
    • View Profile
Image Border Links
« Reply #3 on: January 25, 2004, 11:31:00 am »
Cool thanks. Just out of interest is there any way to change it on hover?

Distorted

  • Newbie
  • *
  • Posts: 0
    • View Profile
Image Border Links
« Reply #4 on: January 26, 2004, 02:33:00 pm »
You can\'t do that with inline styles since you can\'t use the hover psuedoclassamobob.

img:hover might work in Mozilla, but I don\'t think that it will work in IE.

I guess that this will make it work in all browsers. (I think  )

Code:
a:link img {
border: 1px solid black;
}
a:hover img {
border: 1px solid red;
}


I wouldn\'t know if that works since I haven\'t actually tried it.

Distorted

  • Newbie
  • *
  • Posts: 0
    • View Profile
Image Border Links
« Reply #5 on: January 26, 2004, 04:39:00 pm »
I should have known that. I\'ve messed up so many times because of a:link.

cardesign

  • Newbie
  • *
  • Posts: 0
    • View Profile
Image Border Links
« Reply #6 on: January 25, 2004, 10:22:00 am »
I am currently doing some work for somebody and I have borders on the images. These images are linked but they use the default linking colours and not those that I specify in the css (works fine on the text links). How do I specify \"a\" colours for the border around the image.

ps. I want to do this in the css and make sure the page remains XHTML compatible

theSpear

  • Newbie
  • *
  • Posts: 0
    • View Profile
Image Border Links
« Reply #7 on: January 25, 2004, 12:27:00 pm »
well.. i dont know how to do it in style=\"\" but
inside head you could do



not sure how to do it inline though.

LazyJim

  • Newbie
  • *
  • Posts: 0
    • View Profile
Image Border Links
« Reply #8 on: January 26, 2004, 04:26:00 pm »
I would do as Distorted said with only small difference...
Code:a img {
   border: 1px solid black;
}
a:hover img {
   border: 1px solid red;
}