How to select a <div> tag inside another <div> tag?
I have the following:
<div id="view">
<div id="navbar">
Placeholder Text
</div>
</div>
I would like to create text in "navbar". However, is there another div in the document called "navbar" in the stylesheet?
I thought it was something like:
#view#navbar {
font-style: normal;
...etc
}
But that did not work.
Thoughts?
+3
5 answers
Put a space between:
#view #navbar {
If you specify two properties together without spaces, you select elements that have both attributes, which is impossible for the identifier, but it is possible, for example, for a class:
<div id="view" class="topmost">
div#view.topmost <-- Will address that element
+6