Jump to content

div child breaches parent div


M.O.S. Studios

Recommended Posts

Here is the issue

 

<div class='content'></div>

 

is going beyound the bottom border of <div class="comic_border"> ... </div>

 

I want 'comic_border' to expand with 'content' rather then let it grow out side of its border.

 

any ideas?

 

css

 

html, body{
border-width: 0px;
padding: 0px;
margin: 0px;
font-size: 90%;
width: 100%;
height: 100%;
background: #000000;
}

.comic_border{
width: 1000px;
height: 100%;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
padding: 25px;
background: #da1b1b;
border: solid 5px #ffffff;
}

.header{
margin-left: auto;
margin-right: auto;
margin-bottom: 25px;
width: 100%;
height: 186px;
background: url(../../images/background/citywhite.png) repeat-x;
}

.content{
width: 100%;
height: 100%;
background: #ffffff;
margin-bottom: 10px;
}

 

html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="common/css/main.css" rel="stylesheet" type="text/css" />

<title></title>
</head>
<body>
<div class="comic_border">
	<div class="header"></div>
	<div class="content"></div>
</div>
</body>
</html>

 

thanks im advance

Link to comment
https://forums.phpfreaks.com/topic/203644-div-child-breaches-parent-div/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.