Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Help changing Header styles (http://forum.bytesforall.com/showthread.php?t=473)

Shepherd Jim Feb 20, 2009 09:26 AM

Help changing Header styles
 
We're trying to remove/reduce the large space placed after headings. We'd like the regular body text to start pretty much immediately following an <h4> (for instance). We like that there be space ABOVE the headings.

I thought that inserting

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

into "CSS Inserts" would override the "margin-bottom: 10px;" I'd found in the "style.css" file, but the space following the <h4>'s is still there.

Do I have to actually edit the "style.css"? Should we EVER be making changes to "style.css"??

I am having fun! Despite what's thought about us "old dogs" -- we can learn a new trick now and then AND we really enjoy the process!

Flynn Feb 20, 2009 11:19 AM

You should not edit style.css if possible. CSS Edits should always overwrite style.css

Even if the margin is 0, h1-6 heading still have a minimum space around them. Add line-height: value; or negative margins margin-bottom: -5px; to further decrease the margin below/above headings

I am using a single heading type (h2) in the following example as you probably wouldn't want to give all heading h1-h6 the same line height:
HTML Code:

h2 {
line-height: 0.8;
}

The value can be just a number (x times of normal), px or em.

To limit the style to the content of post/page bodies:

HTML Code:

.post-bodycopy h2 {
...
}

or

HTML Code:

.post-bodycopy h2,
.post-bodycopy h3,
.post-bodycopy h4,
.post-bodycopy h5 {
...
}



All times are GMT -6. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.