Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser Ignoring Relative Div Height... 1

Status
Not open for further replies.

BoulderBum

Programmer
Jul 11, 2002
2,179
US
I have what seems like a simple layout issue: I want a div to be a fixed relative height. Unfortunately, this one has me stumped and frustrated. Why doesn't this work and what do I need to do to fix it:

Code:
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<body>
    <form>
        <div style="[b]height: 100%[/b]; background-color: Orange">
            test
        </div>
    </form>
</body>
</html>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"
<html xmlns=" <head>
<title></title>
<style type="text/css">
html, body { margin: 0; padding: 0; height: 100%; }
</style>
</head>
<body>
<form>
<div style="height: 100%; background-color: Orange">
test
</div>
</form>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top