Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Simple: OK if I use an <h1> or <p> tag how do I elimiate the extra space after it


Message #1 by "Joe Coppola" <joco@e...> on Mon, 4 Mar 2002 10:51:21 -0500
Message from Brady Anderson (3/4/2002 05:38 PM)
> > I would like to create a heading that doesnt not have space after it 
> but the
> > font is bigger and bolder.  BUT I want to control it with a CSS.  Any 
> ideas?
>Create a custom class in your CSS style sheet:
>.BoldHeader{
>      font-size: 8;
>      font-color: black;
>      etc.
>      }
>
>reference your class in a table cell or something
><tr>
>     <td class="BoldHeader">Text Here</td>
></tr>

egad! that's not the best way man... that destroys the structural integrity 
of the HTML elements.

Joe, to answer your question, you can do this by modifying the margins and 
padding of the Hx elements...
Try this bit of CSS

h1, h2, h3, h4, h5, h6
{
margin:0;padding:0
}

removes the spacing from all Hx elements.


  Return to Index