Forum Moderators: not2easy

Message Too Old, No Replies

margin-bottom

         

th1chsn

6:17 pm on Jan 30, 2008 (gmt 0)

10+ Year Member



I'm trying to remove the bottom margin but for some reason it isn't working. My margin-top is working fine. Here's how I have it setup:

BODY {
background-color: #C5C8A9;
margin-top: 0px;
margin-bottom: 0px;
}

Does anyone know why it works for the top and not the bottom?

Old_Honky

12:42 am on Jan 31, 2008 (gmt 0)

10+ Year Member Top Contributors Of The Month



It could be affected by the margin on some other element eg your html or a container div.

Safest way is to put this at the top of your css to zero all margins and padding and remove borders, then add them back in as required.


*{
margin:0;
padding:0;
border: none;
}

When declaring a zero value there is no point in using units like pixels (or anything else) zero is zero.

th1chsn

3:58 am on Jan 31, 2008 (gmt 0)

10+ Year Member



Thanks for the tip. That worked out great.