Tom
Tom

Reputation: 3520

Padding issue when floating elements inside container

I'm trying to add vertical space between some sections of a page by adding a bottom padding to the section containers, but I can't get it to work. I assume that it has something to do with the fact that I've got un-ordered lists inside the containers and that the list items are floating (using float: left;).

I have also tried with margins and what not, but to no avail.

Upvotes: 4

Views: 8700

Answers (2)

Dominic Green
Dominic Green

Reputation: 10260

Floating your containers left, as well, and then adding bottom margins should fix it

#developers, #contributors, #playtesters
{
    float: left;
    margin-bottom: 30px;
    ...
}

Upvotes: 4

mmwtsn
mmwtsn

Reputation: 111

Either float the containers left or set overflow to "auto." With either solution you will still need to set a margin to create the aforementioned spacing.

#developers, #contributors, #playtester {
  overflow:auto;
}

Upvotes: 6

Related Questions