Welcome to WebmasterWorld Guest from 107.20.28.48

Forum Moderators: not2easy

Message Too Old, No Replies

How to fix blank space below h1 tags

     
3:12 pm on Mar 10, 2008 (gmt 0)

Preferred Member from GB 

10+ Year Member

joined:Jan 26, 2004
posts:636
votes: 0


if i set a h1 to 12pt or anything else i am left with a blank space under it? is there a way i can close this gap?
3:52 pm on Mar 10, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
posts:3719
votes: 0


In your stylesheet, remove the default padding:

h1 {
padding:0;
}

dc

4:44 pm on Mar 10, 2008 (gmt 0)

Preferred Member from GB 

10+ Year Member

joined:Jan 26, 2004
posts:636
votes: 0


hi
there is not a padding in there?
4:48 pm on Mar 10, 2008 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member pageoneresults is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 27, 2001
posts: 12169
votes: 55


It could be padding, margin or line-height.

font: normal 12px/12px arial, sans-serif;
5:27 pm on Mar 10, 2008 (gmt 0)

Preferred Member from GB 

10+ Year Member

joined:Jan 26, 2004
posts:636
votes: 0


h1 { font-size: 12pt; font-weight: bold; font-family:Tahoma }
9:20 pm on Mar 10, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 7, 2003
posts:4783
votes: 0


Your browser would have typically some preset padding and/or margin on <h1>. Reset them to get rid of the default.

If you start a new CSS, it might be a good idea to reset all padding and margins:

* {padding:0; margin:0}

Now remember this messes with e.g. <ul>'s that need some of that, so you'll end up styling them to get hem back to "normal". Les aggressive resetting can of course be done as well.

7:13 pm on Mar 11, 2008 (gmt 0)

Preferred Member from GB 

10+ Year Member

joined:Jan 26, 2004
posts:636
votes: 0


that does not really solve the issue?
11:58 pm on Mar 15, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:June 2, 2006
posts:2124
votes: 3


Have you tried using Firefox and its CSS tool to see all CSS being applied to your H1 tag?

I always specifically set margin and padding for H tags.

If setting it to zero did not help, than there may be something else around your H1 tag that is making that gap.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members