Mia
Mia

Reputation: 6531

Padding and Text - Text being cut

I'm trying to bottom-align a div content with padding. However, for some reason padding keeps cutting the text. You can see the working example here on cssdeck link http://cssdeck.com/labs/wpj8sl4k

As you can see the bottom part of the text is cut, when the padding is removed everything gets back to normal.

Suggestions are appreciated.

Upvotes: 0

Views: 1112

Answers (5)

Mina Hafzalla
Mina Hafzalla

Reputation: 2821

Yes as MISHAK Said

Remove these lines. It does not make any sense.

<div id="content2">
</div>

Good luck!

Upvotes: 0

Jude Duran
Jude Duran

Reputation: 2205

Use specific padding and margin

#content div{
    padding-left: 24px;
    padding-right: 24px;
    margin-bottom: 24px;
}

Upvotes: 0

Mina Hafzalla
Mina Hafzalla

Reputation: 2821

Remove the following from your body & it will work fine.

<div id="content2">
</div>

Upvotes: 1

Explosion Pills
Explosion Pills

Reputation: 191729

#content2 also follows the same CSS rules, so it will appear above #content. This is especially visible if you actually add content to it, and the effect is likely undesirable. If you want #content1 and #content2 to flow together, you should wrap both of them in the absolutely positioned div and give them static positioning.

http://cssdeck.com/labs/ctxinf3b

Upvotes: 2

nick
nick

Reputation: 610

You're effecting both divs by saying #content div. What you want is #content div#content1.

Upvotes: 1

Related Questions