NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page div height problem

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 05-11-2004, 06:30 AM THREAD STARTER               #1 (permalink)
tot
New Member
Join Date: May 2004
Posts: 3
tot is an unknown quantity at this point
 



Question div height problem


Im having a real problem setting a div to resize with the browser. The div works in mozzila but not in IE. The div is within a container div, but 230 pixels down(red div in code). I also dont know why min hight and width dont work?

Please can some one help!!!!

orginal 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>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<link href="css/main.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--html,body {
height: 100%;
width: 100%;
min-width: 760;
min-height: 420;
}
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 10px;
font-style: normal;
font-weight: normal;
height: 100%;
width: 100%;
min-width: 760;
min-height: 420;
margin: 0px;
padding: 0px;
}
#mainArea{
background-color: #E5E5E5;
display: block;
position: absolute;
left: 1%;
top: 1.33%;
right: 1%;
height: 97.34%;
width: 98%;
min-width: 760;
min-height: 420;
z-index: auto;
bottom: 1.33%;
overflow: hidden;
}
#header{
position:relative;
left: 0.5%;
top: 4px;
right: 0.5%;
height: 25px;
width: 99%;
background-image: url(../images/top_bar_bg.gif);
background-repeat: repeat-x;
z-index: 1;

}
#mainimage{
position:relative;
left: 0.5%;
top: 6px;
right: 0.5%;
height: 175px;
width: 99%;
background-color:#290918;
background-repeat: no-repeat;
z-index: 1;
background-image: url(../images/computer.jpg);
background-position: left;
}

#mainContent{
position:absolute;
left: 0.5%;
right: 0.5%;
width: 99%;
background-color:#FF0000;
z-index: auto;
bottom: 1.33%;
????: NamePros.com http://www.namepros.com/programming/30143-div-height-problem.html
top: 230px;
overflow: auto;
}
-->
</style>
</head>
<body>
<div id="mainArea">
<div id='header'>
</div>
<div id='mainimage'></div>
<div id='menu'>
</div>
<div id='mainContent'>
</div>
</div>
</body>
</html>
tot is offline  
Old 05-11-2004, 11:52 AM   #2 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
<div style='height:100%; width:100%' >ontent</div>


that should work
adam_uk is offline  
Old 05-12-2004, 07:50 AM THREAD STARTER               #3 (permalink)
tot
New Member
Join Date: May 2004
Posts: 3
tot is an unknown quantity at this point
 



I need the div slightly within the window. I have now sorted the min-height & min-width issue. I still cant get the div to strech in IE.

Thanks Anyway
tot is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 06:03 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger