styling links inside a div with a specific class
.navigation-div a:link, .navigation-div a:visited {
color:red;
}
jsFiddle example
Changing a link-style, only for a certain class
Maybe your tested links are visited links.
I prefer:
#navbar a:hover,
#navbar a:visited
{
background-color: #3366FF;
}
apply CSS to links inside DIV
You should have a look at Combinators in CSS.
If you want the exact style of .headband
to apply for <a>
elements inside .headband
too, then use
.headband, .headband a {
/* ... */
}
Otherwise, just create a new section like
.headband a {
/* ... */
}
How to change a:link and a:hover for a div alone?
In CSS:
div.classname a:link {
color: #123456;
}
div.classname a:hover {
color: #123;
}
div.classname a:visited {
color: #654321;
}
In HTML:
<div class="classname">
<a href="#link">link</a>
</div>
Related Topics
Angularjs: with Ng-Animate & Ng-View, How to Make a 3D Cube Rotation Effect
Bootstrap - Spacing Between Form-Inline Elements
How to Capitalize First Letter Only Using CSS in Each Case
Code Folding for CSS in Vscode
Make Narrow Characters with CSS
Bootstrap Button Active Color Change
CSS Center Image in a Clipped Parent Div
Chrome Not Picking Up @Font-Face Otf
Media Query About Screen Size Instead of Resolution
CSS Flexbox Width 100% Firefox
Text Wrapping Incorrectly for Radio Button
How to Create Nested Loops with Less CSS
Internet Explorer CSS Property "Filter" Ignores Overflow:Visible
How to Fade Out Sides of Images
Issue: Audit Usage of Navigator.Useragent, Navigator.Appversion, and Navigator.Platform