Remove space before and after H tags. |
| by Roger Chartier: |
This aggravated me for a long time.
I never got around to figuring out how to get rid of the space before and after the H tags.
|
The issue isn't just the <h> tags it is the space above the following <p> tag
The code immidiately below removes the top margin. |
p { margin: 0 0 1em; }
|
| You can try this just below here as well |
p {display:inline;} |
|
Here is the CSS code for removing space before and after < H > tags to add to your CSS file. |
In the example below I removed all of the <p> </p> tags and added the code in the box below then manually added the <h3> tags.
It worked but, I wonder about how the search engines will like it. |
h3 {
font-size: 16px;
margin-bottom: 0px;
margin-top: 0px;
padding-bottom: 0px;
padding-top: 0px;
bottom: 0px;
margin-bottom: 0px;
top: 0px; |
| |
Here is one code you might try to use in your CSS file for inline display |
h1,h2,h3,h4,h5,h6 {
display: inline;
} |
Below are alternatives |
For removing space from below add this code |
h1,h2,h3,h4,h5,h6{
margin-bottom: 0px;
padding-bottom: 0px;
} |
| |
To remove space from above use this code |
h1,h2,h3,h4,h5,h6{
margin-top: 0px;
padding-top: 0px;
} |
| |
To remove space from both top and bottom |
h1,h2,h3,h4,h5,h6{
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 0px;
} |