Board index PBase HTML and Style Sheets Specify font colour/style in Links?

HTML and Style Sheets

Specify font colour/style in Links?

Customize your galleries.
annajane
 
Posts: 8

Specify font colour/style in Links?

Post Sun Jul 29, 2007 8:04 pm


Hey :)

I think I've pretty much got my CSS figured out,
I'm just wondering if it's possible, under .caption, to specify the colour & style of the font of a link, or is it overridden by the a:link tag which controls every page?

Thanks for reading.

alangrant
 
Posts: 861


Post Sun Jul 29, 2007 8:34 pm


It is possible, by specifying a format that applies only within .caption.

For example the code
.caption a:link {color: red}
would display links within .caption in red, without affecting any links outside captions.
Alan
Travel Photos - http://www.pbase.com/alangrant
Balkanology: Explore Southeast Europe - http://www.balkanology.com/

annajane
 
Posts: 8


Post Thu Nov 15, 2007 9:22 pm


I made this post ages ago, and then left it for a while, but now I'm trying with this again, and it's still not working!

Does anyone know why the "caption a:link {color: red/whatever }" isn't working?

dang
 
Posts: 3780


Post Sat Nov 17, 2007 9:08 am


Are you adding it into your style sheet CSS, or trying to add it into your description area? If you'll give us a link to a gallery you're using the sheet, it might help. Also, if you could post the entire CSS here would allow us to try it if needed. :wink:

alangrant
 
Posts: 861


Post Sat Nov 17, 2007 11:59 am


It does work - I have justed looked at this image and the "For sale" link appears in red.

However my description above was incomplete - sorry about that. It only covers unvisited links. For a complete specification of how links appear, play around with this code:

.caption a:link {color: red ;}
.caption a:visited {color: red ;}
.caption a:active {color: red ;}
.caption a:hover {color: red ;}
Alan
Travel Photos - http://www.pbase.com/alangrant
Balkanology: Explore Southeast Europe - http://www.balkanology.com/

dang
 
Posts: 3780


Post Sat Nov 17, 2007 12:10 pm


Looks like it's working with Firefox, and IE to me also.


Board index PBase HTML and Style Sheets Specify font colour/style in Links?

Who is online

Users browsing this forum: ClaudeBot and 2 guests