Liquid Fire Posted September 2, 2007 Share Posted September 2, 2007 here is my html code: <div class="team_info"> <div class="name center"><h3>Ryan Zec</h3></div> <div class="name"><span class="header">Job:</span> One of my biggest responsibilities is maintianing the website. I am also involved in many other aspects of the company include game design and programming.</div> <div class="name"><span class="header">Birth Place:</span> Waltham, MA</div> <div class="name"><span class="header">Interests:</span> Movies, Music, Bike Riding, Video Games, Just Having Fun.</div> <div class="name"><span class="header">Fav. Music:</span> Eminem, A Day to Remember, Linkin Park, Papa Roach, Limp Bizkit</div> <div class="name"><span class="header">Fav. Movies:</span> Star Wars, Liar Liar, Spaceballs, </div> <div class="name"><span class="header">Fav. Websites:</span> www.gamedev.net, www.3dbuzz.com, www.phpfreaks.com</div> </div> now this css works: div > span.header { font-weight: bold; font-size: 24px; } but this does not div.team_info > span.header { font-weight: bold; font-size: 24px; } why does the second one not work? Quote Link to comment Share on other sites More sharing options...
moberemk Posted September 2, 2007 Share Posted September 2, 2007 The > symbol is used to indicate that it is a direct descendant, IE in the very first child element. The first one tells it to select and span.header tags that are directly after div elements, while the second only applies to span.headers directly beneath div.team_infos. Just take out the > and it will work fine. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted September 2, 2007 Share Posted September 2, 2007 That html markup is awful!!!! divs are for sectioning up you bits of content - all those div class=name could be paragraphs but in this case the most appropriate markup would probably be a definition list. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.