Padding problems

I am creating a master right now and have hit the buffers with a padding problem.

I have a div with a padding of 20px. Within this I have four divs side by side. When I preview, the main div has padding to the right and left but none top or bottom.

What am I doing wrong?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

A link to your page online would help and a description of what you are trying to achieve.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Assumed that you are talking about box-model layout, I always try to avoid padding (top and bottom) by using spacer divs above and below the main-content div. This might be on the basic view much more work, but in fact it is giving me a bit more flexibility - and as a plus-present cross-browser consistency will mean:

content-wrapper, insert 3 divs (spacer-top, row-carrier, spacer-bottom; set them clear to both)

click in row-carrier and insert your 4 divs side-by-side into it.

The second thing you could try is not to add the padding top to the parent box (content-wrapper), but to add it to the child-box:

so row-carrier padding-top x-Pixels and see what happens. If it is (what I hope) successful you can (if necessary) delete the spacer-divs.

If you are not talking about box-model, forget what I said :slight_smile:

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Thomas. I’ll try the two suggestions.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options