[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 05-11-2004, 05:30 AM   #1 (permalink)
tot
New Member
 
Join Date: May 2004
Posts: 3
5.00 NP$ (Donate)

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%;
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, 10:52 AM   #2 (permalink)
Senior Member
 
Join Date: May 2003
Posts: 2,211
6,170.25 NP$ (Donate)

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, 06:50 AM   #3 (permalink)
tot
New Member
 
Join Date: May 2004
Posts: 3
5.00 NP$ (Donate)

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 03:32 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85