PDA

View Full Version : CSS links not working, please help!


Streaky dwarf
07-28-2011, 06:44 PM
Hey guys,

I've been working on a shop template for a while and I've become completely bamboozled by something. Basically on my category section it seems to be ignoring any of style sheet coding regarding the links. I can add a seperate style sheet but I would like to know what my coding isn't working under my style section. Can anyone have a look and help? I would really appreciate it.

Basically my links are coded as such;<a href="#" class="links">Lego</a>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<a href="#" class="links">Comics</a></td>
</tr>
<tr>
<td>
<a href="#" class="links">He-Man</a></td>
</tr>
<tr>
<td>
<a href="#" class="links">Heroclix</a></td>
</tr>
<tr>
<td>
<a href="#" class="links">G.I.Joe</a></td>
</tr>
<tr>
<td>
<a href="#" class="links">Thundercats</a></td>
</tr>
<tr>
<td>
<a href="#" class="links">M.A.S.K</a></td>
</tr>
<tr>
<td>
<a href="#" class="links">Transformers</a></td>
</tr>
<tr>
<td>
<a href="#" class="links">Retro Games</a></td>
</tr>
<tr>
<td>

And my style sheet is;<style>
a.links:link {
font-family:Arial, Helvetica, sans-serif
font-size:14px
color:#27e3df;
text-decoration:none
font-weight:bold}
a.links:visited { font-family:Arial, Helvetica, sans-serif
font-size:14px
color:#27e3df;
text-decoration:none
font-weight:bold}
a.links:active { font-family:Arial, Helvetica, sans-serif
font-size:14px
color:#27e3df;
text-decoration:none
font-weight:bold}
a.links:hover { font-family:Arial, Helvetica, sans-serif
font-size:14px
color: #27e3df
text-decoration:underline
font-weight:bold}
</style>

You can see the reult here;
zoltarstoysandcollectibles.info/shop

Many thanks,
Elliott

domedia
07-28-2011, 07:27 PM
you need a semi-colon after the font-family declaration.

;

Actually you need between all the declarations, except the last one.

Example:
a.links:link {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #27e3df;
text-decoration: none;
font-weight: bold
}

.

Streaky dwarf
07-28-2011, 07:35 PM
Amazing, thank you so much! 2 hours I've been on that!

d a v e
07-29-2011, 08:10 AM
and your link order should be Link, Visited, Hover, Focus, Active

this is useful for catching those obvious but easily missed things
http://jigsaw.w3.org/css-validator/