CSS Style Sheets

Creation & Innovation

Moderator: Moderators

CSS Style Sheets

Postby DJ » Mon Aug 27, 2007 5:06 pm

Hate the line underneath your H-tags?!

Add this to your style sheet!

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

Took me forever to find this easy little snipit of code. Thank you CSS! :o
The Deej
|
DJ
Site Admin
 
Posts: 1022
Joined: Thu May 04, 2006 4:47 pm

More options

Postby Prashant » Thu Sep 06, 2007 9:23 am

Just to add.. If you want more control on the spacings you can specify the style like this

h1 {
margin:5px 0px 5px 0px;
}

Now to explain it more, Using the code you have assigned 5 pixel margin to the top and 5 pixel margin to the bottom.

The format for specifying the margin is as follows margin: top(5px) right(0px) bottom(5px) left(0px);


You can use the same format for padding as well.
Prashant
 
Posts: 160
Joined: Wed Jan 03, 2007 1:12 pm


Return to Web Design

Who is online

Users browsing this forum: No registered users and 28 guests