NancyJ
04-08-2006, 10:59 PM
Ok its late, and I'm tired but I'm going out of my mind with this. Firefox just wont behave. Its all working perfectly in IE but FF wont do as its told.
The issues I'm currently having are a 20ish px gap at the top of the page, despite the body having margins and padding both set to 0 and no other divs having top margin or padding values set.
The second problem is min-height, it just isnt working, I have min-height set to 100% for body and the main div and wrapper and they're just sizing to fit the contents.
I've done this dozens of times and not had a problem, I just cant see that I'm doing anything different - its really frustrating me. Everything validates, but FF wont play nice :(
html, body
{
font-family: verdana, arial, helvetica, sans-serif;
font-size:100%;
color:#000;
background-color:#FFF;
margin:0px;
padding:0px;
min-height: 100%;
*height:100%;
}
#wrap
{
background-image:url(../images/shadow.gif);
min-height: 100%;
*height:100%;
width:780px;
margin:auto;
}
#main
{
min-height: 100%;
*height:100%;
margin:auto;
width:742px;
padding:0 10px 0 10px;
background-image:url(../images/mainbg.gif);
font-size:0.9em;
}
#main h1.banner span
{
display:none;
}
form#signup
{
float:right;
width:300px;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>WeQuote Windows</title>
<style type="text/css"><!--
@import url("style/style.css");
--></style>
</head>
<body>
<div id = "wrap">
<div id = "main">
<h1 class = "banner"><span>WeQuote Windows</span><img src = "images/wequote.jpg" alt = "We Quote Windows" /></h1>
<form id = "signup" method = "post" action = "quote.php">
<fieldset>
<label for = "name">Name: </label><input type = "text" id = "name" name = "name" /><br />
<label for = "email">Email: </label><input type = "text" id = "email" name = "email" /><br />
<label for = "phone">Phone: </label><input type = "text" id = "phone" name = "phone" /><br />
<label for = "address">Address: </label><textarea id = "address" name = "address" rows = "5" cols = "20"></textarea><br />
<input type = "submit" class = "getQuote" name = "getQuote" value = "Get Quote" /><br />
</fieldset>
</form>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam eu nisl vitae nisi varius hendrerit. Donec blandit tortor at est. Nulla facilisi. Ut quis libero et ipsum malesuada venenatis. Integer metus purus, varius a, ultricies et, consectetuer et, sem. Curabitur risus lectus, ultricies ut, eleifend id, molestie sit amet, mi. Mauris massa. Duis sed neque. Sed iaculis felis in metus. Duis ultrices nunc eget neque. Ut porta. Etiam varius, lorem at dapibus consectetuer, libero sem blandit lacus, gravida iaculis nulla metus ac sapien. Sed et ligula quis leo adipiscing euismod.</p>
<p>Cras cursus. Suspendisse orci. Sed mattis. Ut sapien leo, ullamcorper vitae, convallis sit amet, lacinia id, felis. Integer semper neque tincidunt diam. Donec quis ipsum. Phasellus nec risus. Suspendisse potenti. Praesent quis augue. Maecenas augue. Sed quis ipsum. Donec eget magna a massa venenatis ultricies. Cras elementum interdum sapien. Quisque non felis. In vitae felis et metus blandit fringilla. Pellentesque elementum, lectus ac vulputate faucibus, sapien tortor aliquam tortor, vel hendrerit enim nunc nec nunc. Integer sodales. Duis quam mauris, ullamcorper vitae, ornare ut, venenatis nec, nisl. Etiam fermentum. Ut ut eros id justo fermentum venenatis.</p>
</div>
</div>
</body>
</html>
The issues I'm currently having are a 20ish px gap at the top of the page, despite the body having margins and padding both set to 0 and no other divs having top margin or padding values set.
The second problem is min-height, it just isnt working, I have min-height set to 100% for body and the main div and wrapper and they're just sizing to fit the contents.
I've done this dozens of times and not had a problem, I just cant see that I'm doing anything different - its really frustrating me. Everything validates, but FF wont play nice :(
html, body
{
font-family: verdana, arial, helvetica, sans-serif;
font-size:100%;
color:#000;
background-color:#FFF;
margin:0px;
padding:0px;
min-height: 100%;
*height:100%;
}
#wrap
{
background-image:url(../images/shadow.gif);
min-height: 100%;
*height:100%;
width:780px;
margin:auto;
}
#main
{
min-height: 100%;
*height:100%;
margin:auto;
width:742px;
padding:0 10px 0 10px;
background-image:url(../images/mainbg.gif);
font-size:0.9em;
}
#main h1.banner span
{
display:none;
}
form#signup
{
float:right;
width:300px;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>WeQuote Windows</title>
<style type="text/css"><!--
@import url("style/style.css");
--></style>
</head>
<body>
<div id = "wrap">
<div id = "main">
<h1 class = "banner"><span>WeQuote Windows</span><img src = "images/wequote.jpg" alt = "We Quote Windows" /></h1>
<form id = "signup" method = "post" action = "quote.php">
<fieldset>
<label for = "name">Name: </label><input type = "text" id = "name" name = "name" /><br />
<label for = "email">Email: </label><input type = "text" id = "email" name = "email" /><br />
<label for = "phone">Phone: </label><input type = "text" id = "phone" name = "phone" /><br />
<label for = "address">Address: </label><textarea id = "address" name = "address" rows = "5" cols = "20"></textarea><br />
<input type = "submit" class = "getQuote" name = "getQuote" value = "Get Quote" /><br />
</fieldset>
</form>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam eu nisl vitae nisi varius hendrerit. Donec blandit tortor at est. Nulla facilisi. Ut quis libero et ipsum malesuada venenatis. Integer metus purus, varius a, ultricies et, consectetuer et, sem. Curabitur risus lectus, ultricies ut, eleifend id, molestie sit amet, mi. Mauris massa. Duis sed neque. Sed iaculis felis in metus. Duis ultrices nunc eget neque. Ut porta. Etiam varius, lorem at dapibus consectetuer, libero sem blandit lacus, gravida iaculis nulla metus ac sapien. Sed et ligula quis leo adipiscing euismod.</p>
<p>Cras cursus. Suspendisse orci. Sed mattis. Ut sapien leo, ullamcorper vitae, convallis sit amet, lacinia id, felis. Integer semper neque tincidunt diam. Donec quis ipsum. Phasellus nec risus. Suspendisse potenti. Praesent quis augue. Maecenas augue. Sed quis ipsum. Donec eget magna a massa venenatis ultricies. Cras elementum interdum sapien. Quisque non felis. In vitae felis et metus blandit fringilla. Pellentesque elementum, lectus ac vulputate faucibus, sapien tortor aliquam tortor, vel hendrerit enim nunc nec nunc. Integer sodales. Duis quam mauris, ullamcorper vitae, ornare ut, venenatis nec, nisl. Etiam fermentum. Ut ut eros id justo fermentum venenatis.</p>
</div>
</div>
</body>
</html>