Poyner, Matt wrote:

> A top margin is added to these headings to space them from the
> paragraph/content that comes before each one (a normal
> convention, I'm sure).
>
> The problem we run into is when a heading is the first content
> on the page (this is the case about 90% of the time) There is
> too much space between the title (<H1>) and the next heading
> (usually <H2>).
>
> So, is there a way through CSS to declare that margins should
> return to 0 for H2 in the following case:
>
> <H1>This is Matt's Page</H1>
>
> <H2>Introduction</H2>
>
> Or, do I need to create a class for these special occasions?

There is CSS to define an h2 following an h1, but it's not 
supported by all the browsers. A class is of course an option, 
but personally, I usually set all top-margins for h* and p to 0, 
and define only bottom margins. In your case, if you only have a 
problem when an h2 follows an h1, how about just setting the 
bottom margin (and perhaps padding) of the h1 to 0? Would it then 
get too close to a following paragraph if there weren't an h2?

-- 
Els
http://locusmeus.com/
http://locusoptimus.com/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to