/    Sign up×
Community /Pin to ProfileBookmark

image border links.. visited, hover

How could I set the image link colors attribute for visited and hover so it only regards for the images and not text links.

I´ve tried something as simple like

Img a:link {border-color: #0000CC}
Img a:visited {border-color: #0000FF}

I could make it happen in the embedded style tho byt just having the a links set

to post a comment
CSS

16 Comments(s)

Copy linkTweet thisAlerts:
@JonaJan 20.2005 — [font=trebuchet ms]The images don't contain the links; the links contain the images. Try either adding a class to the links that have images in them or remove borders from all images.[/font]
Copy linkTweet thisAlerts:
@SiddanauthorJan 20.2005 — ahh sorry... I forget to tell they are thumbnail links. I have a few pages with images so I wouldn´t rather name each and every img links with a class hehe
Copy linkTweet thisAlerts:
@JonaJan 20.2005 — [i]Originally posted by Siddan [/i]

[B]ahh sorry... I forget to tell they are thumbnail links. I have a few pages with images so I wouldn´t rather name each and every img links with a class hehe [/B][/QUOTE]


[font=trebuchet ms]I would be correct, then, to presume your problem has been solved?[/font]
Copy linkTweet thisAlerts:
@SiddanauthorJan 20.2005 — nope ?

but when I set it like this...

IMG, a:link {border-color:#0000cc}

then it displays only for the thumb links and no border to linkless images.. so far so good

but when I set this line under....

IMG, a:visited {border-color:#0000cc}

.. or even hover, then those colors will be the default instead
Copy linkTweet thisAlerts:
@ray326Jan 20.2005 — Wrap the thumbnails in a div, class="thumbs" and style with a .thumbs img selector.
Copy linkTweet thisAlerts:
@SiddanauthorJan 20.2005 — There´s lots of images.... wouldn´t fancy the idea. rather have the imbedded style if there is no other solution
Copy linkTweet thisAlerts:
@JonaJan 20.2005 — [i]Originally posted by Siddan [/i]

[B]There´s lots of images.... wouldn´t fancy the idea. rather have the imbedded style if there is no other solution [/B][/QUOTE]


[font=trebuchet ms]I'm sorry, can you explain further?[/font]
Copy linkTweet thisAlerts:
@TriumphJan 20.2005 — I think ray's idea is just peachy!
Copy linkTweet thisAlerts:
@SiddanauthorJan 20.2005 — little unclear... did he meant inserting a class inside every img tag or having all the img inside a div and putting a class inside the entire div?

if the latter, Then I have already done that, named the div to thumbsBlock..

so how would I type exactly?

div.thumbsBlock, Img a:visited {color: white} ? I must be way off, lol
Copy linkTweet thisAlerts:
@NashCAJan 20.2005 — try the following

A:visited {color: #02123E; text-decoration: none;}

a:hover{color : #02123E;background-color : #FDC5FB; font-weight:normal}

I hope it will work your prob out

Happy Surfing
Copy linkTweet thisAlerts:
@JonaJan 20.2005 — [i]Originally posted by Siddan [/i]

[B]little unclear... did he meant inserting a class inside every img tag or having all the img inside a div and putting a class inside the entire div?



if the latter, Then I have already done that, named the div to thumbsBlock..



so how would I type exactly?



div.thumbsBlock, Img a:visited {color: white} ? I must be way off, lol [/B]
[/QUOTE]


[font=trebuchet ms]It was indeed the latter. Try the following:[/font]

<i>
</i>div.thumbsBlock img a:visited {color:white}
Copy linkTweet thisAlerts:
@SiddanauthorJan 20.2005 — NashCA, I still want to have my a link colors set already and only change the link border color around the thumbnails

Jona, nope, I can´t seem to get to respond. Did it work for you?
Copy linkTweet thisAlerts:
@JonaJan 20.2005 — [font=trebuchet ms]Sorry, I misread your code and didn't correct it properly. Remember that the link is not inside of the image, so that code will not affect anything at all.[/font]

<i>
</i>div.thumbsBlock a:visited img {border:none}
Copy linkTweet thisAlerts:
@TriumphJan 20.2005 — ...
Copy linkTweet thisAlerts:
@SiddanauthorJan 21.2005 — ah well,, I just leave it for one static color then
Copy linkTweet thisAlerts:
@ray326Jan 21.2005 — Do you have text anchors interspersed with the thumbnails? The selector in Jona's last post should do the job.
×

Success!

Help @Siddan spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...