...

View Full Version : CSS a:link not working



missundaztood
01-04-2004, 03:05 PM
Hi guys, I was wondering if someone could help me out with this simple problem. This is the link part of my CSS code

<style type="text/css">

A:link
{text-decoration:none; color:#FFFFFF}


A:visited
{text-decoration:none; color:#21EDFF}


A:hover
{text-decoration:none; color: #FFFFFF}

On my website, the links work perfectly as according to my css script when i hover and when they're visited. However, the main A:link isn't white, instead it's like the normal browser link colour, blue and is underlined.

This is my html coding

<HTML>
<HEAD>
<TITLE>..::Cambodia::..</TITLE>
<LINK href="stylesheet_kvetch2.css" rel="stylesheet" type="text/css">

</HEAD>
<BODY>




<div id=layer1 style="position:absolute; top:20; left:150; width:700; height:300; padding:2px; background-color:white;">

<img src="http://www.freewebs.com/kvetch2/cambodia.jpg">

</div>


<div id layer2 style="position:absolute; top:320; left:152; width:700; height:500; z-index:1; padding:5px; border: #000000 2px solid; background-color:#000000; overflow:auto;">


<div align="right"><a href="http://freewebs.com/kvetch" style="cursor:crosshair;"> | Home </a> <a href=http://www.freewebs.com/kvetch2/pictures.htm" style="cursor:crosshair;"> | Pictures | </a> </div>

Can anyone help? Sorry if it's kind of messy! Thanks!

Nightfire
01-04-2004, 03:26 PM
If you're linking the css to the page via the link tag, then don't use <style></style> in the css file.

Replace what you got with


a {
text-decoration:none;
color:#FFFFFF
}

a:visited{
color:#21EDFF
}


And if all your links are to be crosshairs, then add this into the a{}

cursor: crosshair

example:



a {
text-decoration:none;
color:#FFFFFF;
cursor:crosshair;
}

a:visited{
color:#21EDFF
}

missundaztood
01-04-2004, 03:42 PM
Oh! I put <style></style> in my css script! Thanks so much! It works now! :thumbsup: Yay!

me'
01-04-2004, 04:06 PM
Also, A:link (should) be different to a:link, as XML is case sensitive. If you're using HTML, it shouldn't matter, though.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum