PDA

View Full Version : DIV Problem



KyleSmith
24-01-2010, 04:48 PM
I have a problem the bottom div isnt going down with the middle div i have added a screenshot

http://files.uploadffs.com/d/3/4b703b0f/PROBLEM.PNG


This is the html code


<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">@import url(css.css);body {
margin-top: 5px;
}
</style>
<title>Untitled Document</title>
</head>
<body>
<div class="box_login_top"></div>
<div class="box_login_top_box_top"></div>
<div class="box_login_top_box_mid"><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
<div class="box_login_top_box_bot"><br />
<br />
</div>
<div class="box_login_mid_bot_box"><br />
<br />
<br />
<br />
<br />
<br />
</div>
<p><br />
<br />
<br />
<br />
<br />
</p>
</body>
</html>




Part of the CSS Code



.box_login_top {
background: url(imgs/top_login.PNG) no-repeat;
float: center;
width: 420px;
height: 84px;
}
.box_login_top_box_top {
background: url(imgs/top_login_box.PNG) no-repeat;
float: center;
width: 420px;
height: 41px;
}
.box_login_top_box_mid {
background: url(imgs/top_login_mid.PNG);
width: 420px;
}
.box_login_top_box_bot {
background: url(imgs/top_login_bot.PNG) no-repeat;
float: center;
width: 420px;
height: 44px;
}
.box_login_mid_top_box {
background: url(imgs/bot_login_top.PNG) no repeat;
float: center;
width: 420px;
height: 53px;
}

.box_login_mid_mid_box {
background: url(imgs/bot_login_mid.PNG);
float: center;
width: 420px;
}
.box_login_mid_bot_box {
background: url(imgs/bot_login_bot.PNG) no repeat;
float: center;
width: 420px;
height: 39px;
}






Thanks

LMS16
24-01-2010, 07:07 PM
Maybe try


float: left;

Rather than float: center;

Your div coding isnt too good, also try <div id=""></div> instead of class and change the . to a # in the css.

Lew.

Blob
24-01-2010, 08:07 PM
Your div coding isnt too good, also try <div id=""></div> instead of class and change the . to a # in the css.

Lew.

Why would he do that? There is no point in changing the id/class to class/id?

LMS16
24-01-2010, 08:24 PM
I guess it just my way of coding :P

Lew.

Want to hide these adverts? Register an account for free!