h2 tag...how can i get multiple of them in the CSS.
I need one for the navigation at the right which i have prefectly placed and now i need it for my middle div which the teal bar is bigger than the one in the navigation menu.
can i do it like this?
h2#navAlpha{
}
and
h2.content{
}
it didnt seem to work for me when i tried it, thanks
<!-- m --><a class="postlink" href="http://marlinsclubhouse.net/index.html#navalpha">http://marlinsclubhouse.net/index.html#navalpha</a><!-- m --> h2To elaborate on what BonRouge said, here are some representative CSS selectors and examples of the HTML where they would apply.
CSS: h2#navalpha {}
HTML: <h2 id="navalpha">yada</h2>
CSS: #navalpha h2 {}
HTML: <div id="navalpha"><h2>yada</h2></div>
CSS: h2.content {}
HTML: <h2 class="content">yada</h2>
CSS: .content h2 {}
HTML: <div class="content"><h2>yada</h2></div>
So what you need to do is pull the width: out of h2 {} and put an appropriate one into each of the "contained" h2s.
#navAlpha h2 { width: 142px }
.content h2 { width: 99% }
#navBeta h2 { width: 182px }
Note: these were hacked in FF and not checked with IE.Good answer!
I need one for the navigation at the right which i have prefectly placed and now i need it for my middle div which the teal bar is bigger than the one in the navigation menu.
can i do it like this?
h2#navAlpha{
}
and
h2.content{
}
it didnt seem to work for me when i tried it, thanks
<!-- m --><a class="postlink" href="http://marlinsclubhouse.net/index.html#navalpha">http://marlinsclubhouse.net/index.html#navalpha</a><!-- m --> h2To elaborate on what BonRouge said, here are some representative CSS selectors and examples of the HTML where they would apply.
CSS: h2#navalpha {}
HTML: <h2 id="navalpha">yada</h2>
CSS: #navalpha h2 {}
HTML: <div id="navalpha"><h2>yada</h2></div>
CSS: h2.content {}
HTML: <h2 class="content">yada</h2>
CSS: .content h2 {}
HTML: <div class="content"><h2>yada</h2></div>
So what you need to do is pull the width: out of h2 {} and put an appropriate one into each of the "contained" h2s.
#navAlpha h2 { width: 142px }
.content h2 { width: 99% }
#navBeta h2 { width: 182px }
Note: these were hacked in FF and not checked with IE.Good answer!