Forum Moderators: not2easy
Here is the CSS:
#banner {
float: right
margin: 0, 0, 0, 0;
padding: 0, 0, 0, 0;
height: 70px;
overflow: hidden;
}#header {
padding: 0px, 0px, 0px, 0px;
margin: 0px, 0px, 0px, 0px;
height: 36px;
width: 800px;
top: 0px;
left: 0px;
position: relative;
text-align: left;
vertical-align: center;
background-image: url('images\bg_middle.gif');
overflow: hidden;
}#categories {
width: 170px;
margin: 0, 0, 0, 0;
overflow: hidden;
background-image: url('images\categories.gif');
float: left;
padding: 0px, 15px, 0px, 10px;
}#content {
overflow: auto;
margin: 0px;
padding: 5px, 0px, 0px, 5px;
background-color: red;
border-style: none;
border-width: 0;
}#main {
padding: 0px, 0px, 0px, 0px;
margin: 0px, auto, 0px, auto;
border-left: thin solid gray;
border-right: thin solid gray;
text-align: left;
width: 800px;
top: 0px;
left: 0px;
background-color: white;
}
Here is the HTML (slightly edited)
<html>
<head>
<link rel="stylesheet" href="master_style.css" type="text/css">
<script language="javascript">
function changeheight() {
windowheight = (window.innerheight ¦¦ document.body.clientHeight)
contentheight = windowheight - 120
var cat = document.getElementById("categories")
var con = document.getElementById("content")
cat.style.height = contentheight
con.style.height = contentheight
}
</script>
</head>
<body onLoad="changeheight()"; onResize="changeheight()">
<div id="main">
<div id="banner">
<IMG SRC="banner.jpg" WIDTH="780"></div>
<div id="header">
Header info
</div>
<div id="categories">
<!-- #include file="categories.asp" -->
</div>
<div id="content">
<!-- #include file="main.asp" -->
</div>
</div>
</body>
</html>
padding: 0; instead of
padding: 0px, 0px, 0px, 0px;
AND
margin 0 auto; instead of
margin: 0px, auto, 0px, auto;
maybe the commas are messing things up.
you dont have add the units in px if using a value of zero.
also float:right for #banner doesnt have a ; behind it. that will def mess things up
let us know!
stef
Not sure what the banner was even floating, so I took that line out, and made the changes you suggested, unfortunatly still not working.
Here is the .css now, including the body, which I think I left out the first time...
body {
background-image: url('images\bg.gif');
text-align: center;
padding: 0;
overflow: hidden;
}
#banner {
margin: 0;
padding: 0;
height: 70px;
overflow: hidden;
}
#header {
padding: 0;
margin: 0;
height: 36px;
width: 800px;
top: 0px;
left: 0px;
position: relative;
text-align: left;
vertical-align: center;
background-image: url('images\bg_middle.gif');
overflow: hidden;
}
#categories {
width: 170px;
margin: 0;
overflow: hidden;
background-image: url('images\categories.gif');
float: left;
padding: 0px, 15px, 0px, 10px;
}
#content {
overflow: auto;
margin: 0;
padding: 5px, 0px, 0px, 5px;
background-color: red;
border-style: none;
border-width: 0;
}
#main {
padding: 0;
margin: 0px, auto;
border-left: thin solid gray;
border-right: thin solid gray;
text-align: left;
width: 800px;
top: 0px;
left: 0px;
background-color: white;
}
I'm not sure but things like this are usually caused by not setting widths on certain elements or from having too much [compared to a parent elem.] in the way of width, margins or padding that will force things to go awry.
Have also seen oddities from having an extra closing bracket [or whatever] in the coding!
Good luck,
El
Tried settings the width of the #content <div> to 100%, didn't change anything. Also changed the margings on the body to 0, that fixed another minor problem I was having, but didn't affect this. I tried settings the width manually, wouldn't let me make it big enough to fill the entrie area. The container div is 800, the navigation is 170, so that leaves 630. If I tried to make it any bigger then 623, then it would put it below the navigation menu instead of beside it.
I'm really stumped, can't figure out why the heck it won't take up all the remaining space!
Validate your CSS using the w3c validator [jigsaw.w3.org...] and you will find there are a couple of issues you need to sort out.
Once done, try putting a temporary coloured boarder around each of the elements [or #id's in this case](Sorry, the correct terminology escapes me!).
You will see that the #header {width: 800px;} is causing the problem.
Changing this width to 100% should solve the problem.
FYI I modded the CSS to:
body {
background-image: url('images\bg.gif');
text-align: center;
padding: 0;
margin: 0;
overflow: hidden;
}
#banner {
margin: 0;
padding: 0;
height: 70px;
overflow: hidden;
border: 1px dotted blue;
}
#header {
padding: 0;
margin: 0;
height: 36px;
width: 100%; /*800px; */
top: 0px;
left: 0px;
position: relative;
text-align: left;
/*vertical-align: center; */
background-image: url('images\bg_middle.gif');
overflow: hidden;
border : 1px solid blue;
}
#categories {
width: 170px;
margin: 0;
overflow: hidden;
background-image: url('images\categories.gif');
float: left;
padding-top: 15px;
padding-bottom: 10px;
border: 1px solid green;
}
#content {
overflow: auto;
margin: 0;
padding-left: 5px;
padding-bottom : 5px;
/*background-color: red; */
border-style: none;
/*border-width: 0; */
border: 1px solid black;
}
#main {
padding: 0;
margin: 0; /* auto; */
border-left: thin solid gray;
border-right: thin solid gray;
text-align: left;
width: 800px;
top: 0px;
left: 0px;
background-color: white;
}
Hope this helps.
GW