I have an anchor tag in a ...
In my HTML, within the tag, I have
.foo {
white-space:nowrap;
text-shadow: 0 -1px 0 #000;
color: #000;
font-family: Helvetica Neue, Helvetica, arial;
font-size: 12px;
}
How do I make it so that I can specify a:link {COLOR: #ffff;}
in this class?
Create HTML Create a <div> with a class name "container". Use the <a> element to add the needed link.
The <div> tag defines a division or a section in an HTML document. The <div> tag is used as a container for HTML elements - which is then styled with CSS or manipulated with JavaScript. The <div> tag is easily styled by using the class or id attribute. Any sort of content can be put inside the <div> tag!
The :link selector is used to select unvisited links. Note: The :link selector does not style links you have already visited. Tip: Use the :visited selector to style links to visited pages, the :hover selector to style links when you mouse over them, and the :active selector to style links when you click on them.
Changing link color on hover using CSS You've probably noticed links changing color when you place your cursor on them, a stylish effect and one that's very easy to implement using CSS. To change the color of your link on hover, use the :hover pseudo property on the link's class and give it a different color.
If your structure is
<div class="foo"><a href="...">...</a></div>
You can style unvisited links thus:
.foo a:link {color: #fff;}
Note: use either 3 or 6 f
s, not 4.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With