using <h2> and <h3> messed up my page. The titles and sub titles on the news articles are now on separate lines, and have a huge space between them, i set my margins and padding to 0 on both and it doesn't fix it. heres my code <div class="news_title"><h2>» Welcome to Gamers Insanity</h2> <h3>Wipe your feet, and make yourself at home!</h3></div> HTML: h2 { font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif; font-weight:bold; padding:0; margin:0 0 0 3px; /*to create space away from left of box*/ } h3 { font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif; font-weight:normal; padding:0; } Code (markup): whats wrong here?
Remember what I said about spans? This is one case where a span might be appropriate. <h2 class="news_title"> » Welcome to Gamers Insanity<span> Wipe your feet, and make yourself at home!</span> </h2> ============= h2.news_title { font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif; /*if this is the default font, it's redundant*/ font-weight:bold; /*headers default to bold; this is redundant*/ padding:0; /*redundant*/ margin:0 0 0 3px; /*to create space away from left of box*/ } h2.news_title span { font-weight: normal; } Code (markup): cheers, gary
okay, thanks, just before you and dan said to use headers for both of those (title and subtitle) i was just confused this should do nicely.
The way you've used the secondary part is more of a tag line. It can be treated as an extension of the header, as I did, or as a separate tag, which would be marked as a <p>. Look at the usage. It is not a sub-header in its own right. You must consider what the content is. It's always something within its context, and that something is never a lonesome span. A span always belongs to a semantic container. I figured this was all a header, with part of it displayed differently. Thus, the span. cheers, gary