To elaborate on what BonRouge said, here are some representative CSS selectors and examples of the HTML where they would apply.
Code:
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.
Last edited by ray326; 04-06-2005 at 11:04 PM.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Bookmarks