- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Simple question really. I want to change colour of the links and of course it’s made by the code we all know about (below).
But it will only work if I put the code in the html document’s head-section. – When I instead try to add it to the stylesheet in a class like "body " – which is supposed to affect the whole site (all sites not only the index etc. ) – well then it wont work.
Isn’t it possible to add these pseudo classes in the css stylesheet?
Regards
I found where the error is – but how do I fix it?
Look
I it closes too early! The rule closes itself after a:link {color:#FFFFFF}
ok :) This is the code in the stylesheet.
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
margin: 0;
padding: 0;
color: #CCC;
background-color: #000000;
a:link {color:#FFFFFF}
a:visited {color:#FFFFFF}
a:hover {color:#FFFFFF}
a:active {color:#FFFFFF}
}
I’ve now bolded where the rule close itself (The {} are in yellow). It leaves out the red in the rule. But I need it to be a rule for the hole page so I need it in a "body" -class dont I. So how do I rewrite the rule so it closes WITH the pseudo classes in it – and not leaving some out?
Silly me, awright! Thank you!