...

View Full Version : 100% height with Strict DTD



CRASH_OVERRIDE
01-16-2003, 01:43 AM
Im working on another (lol) layout, and I want one of my divs to be 100% height. Is there any way of accomplishing this using a XHTML 1.0 Strict or Transitional DTD

jkd
01-16-2003, 01:49 AM
html, body, .mybox {
height: 100%;
}

Where your div is assigned a class of "mybox"

CRASH_OVERRIDE
01-16-2003, 02:13 AM
Thanks, never wouldve thought of that. Now, another problem with my divs (just a mock-up template; my first time not using tables:)) is getting the #leftCol and #mainCol side-by-side. Any ideas?


<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />
<html>
<head>
<style type="text/css">
html,body{height:100%;}
div{border:1px solid #000000;width:40px;}
#leftCol {display:inline;}
#leftCol_top {}
#leftCol_mid { height:50%; }
#leftCol_bot {}
#mainCol {display:inline;}
#mainCol_top {}
#mainCol_logo {}
#mainCol_menu {}
#mainCol_location {}
#mainCol_contContainer {}
</style>
</head>
<body>
<!--..................................LEFT COLUMN..-->
<div id="leftCol">
<div id="leftCol_top">a
</div>
<div id="leftCol_mid">s
</div>
<div id="leftCol_bot">d
</div>
</div>
<!--...................................MAIN COLUMN..-->
<div id="mainCol">
<div id="mainCol_top">f
</div>
<div id="mainCol_logo">g
</div>
<div id="mainCol_menu">h
</div>
<div id="mainCol_location">j
</div>
<div id="mainCol_contContainer">k
</div>
</div>
</body>
</html>

jkd
01-16-2003, 02:17 AM
Don't change their display. float: left
leftCol, and you're fine.

CRASH_OVERRIDE
01-16-2003, 02:44 AM
Thanks you mucho.:)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum