Forum Moderators: not2easy
I help run a charity website and its on the bt community server, meaning when we code the pages we don't have access to the header section of the HTML. We can put it in and they just strip it out.
I am trying to put in place a:hover commands that change the background and font colour when someone hovers on a link, but without being able to specify this in <style> in the header, whatever I try is not working
I can use text-decoration to alter the appearance of the link when not in use, but its a one-game hammer.
Any help greatly appreciated
Thanks
have you tried putting the style declaration inside the body element?
<body>
<style type="text/css" media="screen">
a {color: red;}
a:hover {color: #fff; background: #000;}
</style>
<p>this is a paragraph <a href="#">with a link</a></p>
</body>
it's considered good practice to put in the <head> but as far as I know it's not completely necessary and the above works in test too, unless the "self validation" strips that out too?
That works - but in order to make it work I had to strip out the additional code I had inserted into the <a href...> tag to make the link black. For some reason the site allows me to choose the hover colours with your code (white on blue suits our colour scheme) but I need to specify the links appear black some way to remove the ugly blue/purple link effect. Tried your a {color:black;} and also tried a:link {color:black;} but neither seem to work