layout check

liunx

Guest
I am at the start of a new site and have now i have got it in the center i now need to sort the background out.

the section "backgroun_main" i need it to be 100% but when i do that nothing happens or when i try to add a new div tag inside it goes nuts.

i need to know how to make other divs work inside that div.

code;

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style type="text/css">
#center_site {
position: absolute;
height: auto;
width: 750px;
top: 200px;
left: 50%;
margin: -200px 0px 0px -380px;
}

#background_main {
position:absolute;
left: 0;
top: 0;
width: 750px;
height: auto;
margin: 0;
padding: 0;
background: #FFF;
}

#2 {
position:absolute;
left: 0;
top:200px;
width: 100px;
height: auto;
margin:0px;
padding:0px;
background: #ff0;
}

#3 {
position:absolute;
left: 0;
top:0px;
width: 50px;
height: 50;
margin:0px;
padding:0px;
background: #110;
}
</style>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>






<div id="center_site">
<body background="tile.gif">

<div id="background_main">

</div>

<span id="2"> <div id="3"></div></span>


</body>
</div>
</html>It is not advisable to use the underscore for class names.

Furthermore using #2 is illegal in CSS you cannot begin id's with numeric values, get those issues sorted first.

;)ummm... okYou'll get much more predictable results if you write standards comliance HTML. Browsers will work in standards comliance mode with a correct DOCTYPE specified and characterset. Otherwise, browsers work in Quirks mode, and support for CSS is very tempermental in this mode.

I was able to get the code you posted to validate as HTML 4.01 Transitional at <!-- m --><a class="postlink" href="http://validator.w3.org/">http://validator.w3.org/</a><!-- m -->

See the attached TXT file, save it as an HTML file and open it in a browser. Let us know if what I've done is what you're after.thanks for the help guys.

the code is alot better now and works in a couple of browsers i have tested it in and on Dreamweaver MX04's internal checker.

thank you:)
 
Back
Top