homepage Welcome to WebmasterWorld Guest from 54.166.84.82
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
question about <h1> tag in css
flashmastermak

10+ Year Member



 
Msg#: 920 posted 10:00 pm on Apr 23, 2003 (gmt 0)

I'm redifining the <h1> tag in a style sheet to reduce it's size, howevewr one property of the <h1> tag is to force a double line break much like the <p> tag

can I change this so that I can have the body text begin in the next line to the <h1> text

Mak

 

Nick_W

WebmasterWorld Senior Member nick_w us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 920 posted 10:07 pm on Apr 23, 2003 (gmt 0)

Hi Welcome to WebmasterWorld [webmasterworld.com]

[webmasterworld.com...]

Msg 5 is what you need!

Nick

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 920 posted 10:14 pm on Apr 23, 2003 (gmt 0)

Another approach that doesn't involve undoing the block character of the tag is to deal with two things: the margin-bottom of the <H1> and the margin-top of whatever element follows it, often a <p>.

The margin collapsing rules state that whichever margin is the larger will be the rendered space between the elements. And it's margins, not just line breaks, that you're seeing in the default behavior of H tags.

To get the following copy to butt right up against the header, both margins should be zero, although I prefer just a few extra pixels in there.

flashmastermak

10+ Year Member



 
Msg#: 920 posted 10:26 pm on Apr 23, 2003 (gmt 0)

thanks

Nick_W and Tedster

Mak

annej

WebmasterWorld Senior Member annej us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 920 posted 3:56 pm on Apr 25, 2003 (gmt 0)

h1
{
display: inline;
}

I was just struggling with this yesterday and here was the answer. What a great forum. Thanks.

Anne

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved