[thelist] Stupid CSS question

Steve Cook steve.cook at evitbe.com
Thu Aug 1 02:32:01 CDT 2002


Time to take a closer look at the Box Model, Madhu ;-)

The H element is a block-level element, which means that it conforms to the
box model and has it's own margin, border and padding attributes. If you
want to remove the space you'll need to style your H element.

However you *could* fiddle with such things as the bottom margin of the DIV
- try setting a negative bottom margin and you should get the H element
moving up into the div! I'm not sure how correct a way of doing things this
is though so you will almost certainly be better off styling the H element

You may also want to experiment with the settings for line-height on your H
element...

.steve


-------------------------------------
 Cookstour - http://www.cookstour.org
-------------------------------------

>
>
> At 12:43 PM 01-08-02, Shashank Tripathi wrote:
> >Off the top, I guess "margin-top: 0px" in the style should
> do what you want.
>
> Well, I tried that, but it works only when you style the H2
> with it. Can't
> I just apply something to the DIV instead?
>
> Madhu

>



More information about the thelist mailing list