as opposed to just:
#user_menu ul
Why is it useful? I've applied the DIV and removed it and it doesn't seem to make a difference...
p.s-Thanks to all, especially Oren, I've learned a heck of a lot about CSS in the last couple days
Moderator: General Moderators
Code: Select all
<div id="user_menu">
<ul>
<!-- This UL would be effected by the div#user_menu ul
</ul>
</div>Code: Select all
<span id="user_menu">
<ul>
<!-- This UL would not be effected by div#user_menu ul, but it would be effected by #user_menu ul or span#user_menu ul
</ul>
</span>Code: Select all
span.bigred {
font-size: 2em;
color: #aa1111;
font-weight: bold;
}
a.bigred {
font-size: 2em;
color: #aa1111;
text-decoration: underline;
}
Code: Select all
div#your_element.bigred {
font-size: 2.5em;
color: #aa1111;
}
Code: Select all
.bigred {
font-size: 2em;
color: #aa1111;
}
.bold_under {
text-decoration: underline;
font-weight: bold;
}
.......
<div class="bigred bold_under"> .... </div>
<span class="bigred"> .... </span>
I was completely unaware of that... thanks d11d11wtq wrote: Just one more thing I swear... there are other ways of applying subtle changes to different elements... apply multiple classes.
Code: Select all
.bigred { font-size: 2em; color: #aa1111; } .bold_under { text-decoration: underline; font-weight: bold; } ....... <div class="bigred bold_under"> .... </div> <span class="bigred"> .... </span>