Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Css, Content not staying inside border

Tags:

html

css

I have the height of this div set to 100% but content keep overflowing out of it.

Here is the page: http://cowgirlsbaking.com/membership

CSS:

#content {

 margin-left: auto;
 margin-right: auto;
 background-color: #FCF6E9;
 width:868px;
 height:100%;
 min-height: 650px;
 -moz-border-radius: 15px;
 -webkit-border-radius: 15px;
 border: 10px solid #EB7CDB;
like image 496
Davey Avatar asked Jun 03 '26 10:06

Davey


2 Answers

Add overflow: auto; to #content.

like image 65
Gert Grenander Avatar answered Jun 06 '26 01:06

Gert Grenander


It's because when you float objects, they do not take up vertical space in the outer element.

The simplest solution is to add this before the end of the content div:

<br style="clear:both">

Or use a class like .clr { clear: both; } with <br class="clr">

like image 21
DisgruntledGoat Avatar answered Jun 05 '26 23:06

DisgruntledGoat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!