Forum Moderators: not2easy

Message Too Old, No Replies

h1 and h4 positioning

how do I ge them to line up

         

Blelisa

8:05 pm on Mar 18, 2004 (gmt 0)

10+ Year Member



Hi, I have a heading using H1 and a subheading using H4. I want the subheading to be directly underneath the h1 without any white space. How do I do that?

Thanks!

Alternative Future

8:14 pm on Mar 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Blelisa,

I think this is the effect you are after...

<style>
h1{
display:inline
}
h4{
display:inline
}
</style>

<h1>heading1</h1><br>
<h4>heading4</h4>

Or you can do it inline to the tags...

<h1 style="display:inline">heading1</h1><br>
<h4 style="display:inline">heading4</h4>

HTH,

-George

your_store

8:21 pm on Mar 18, 2004 (gmt 0)

10+ Year Member



No need to introduce extra markup. You just need to remove the margins from your headers like so:

h1, h4 {
margin: 0;
}

You really should be following your h1 w/ an h2, but I digress.

Blelisa

8:35 pm on Mar 18, 2004 (gmt 0)

10+ Year Member



Got it! Looks beautiful!(changed h4 to h2 for semantics) Thanks guys!