newtocssuk
12-14-2010, 09:20 AM
i'm having a problem with the legth of the pages, every page on my website is a different size and i want the side bar to move with the text area i'm not sure how to fix it, any help would be great
body {
background-image: url("img/backkk9.gif");
font-size: 10px;
font-family: "Verdana",Arial,Helvetica,sans-serif;
height: 780px;
}
h1 {
font-size:2.5em;
}
h2 {
font-size:1.875em;
}
p.date {
text-align:right;
}
p.main {
text-align:justify;
}
a:link {
color: #105289;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #105289;
}
a:hover {
text-decoration: none;
color: #d31141;
}
a:active {
text-decoration: none;
color: #368AD2;
}
#wrapper {
width: 797px;
margin: 0 auto;
}
#mainbackground {
position: relative;
top: 10px;
width: 797px;
margin: 0px auto;
height: 760px;
border: 1px solid #CADCEB;
background: #ffffff;
}
#logo {
position: relative;
top: 15px;
width: 767px;
height: 122px;
margin: 0px auto;
border: 1px solid #CADCEB;
background-image: url("img/testing1.png");
}
#navbar {
position: relative;
top: 18px;
width: 767px;
height: 24px;
margin: 0px auto;
border: 1px solid #CADCEB;
background: #CADCEB;
}
#text {
position: relative;
top: 25px;
width: 600px;
left: 14px;
float: left;
height: 568px;
border: 1px solid #CADCEB;
border-right-style:none;
background: #ffffff;
}
#sidebar {
position: relative;
top: 25px;
width: 167px;
left: 14px;
float: left;
height: 568px;
border: 1px solid #CADCEB;
border-left-style:none;
background: #E1EBF2;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="SHORTCUT ICON" href="img/favicon.ico" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="mainbackground">
<div id="topnavbar"></div>
<div id="logo"></div>
<div id="navbar"></div>
<div id="text">my text </div>
<div id="sidebar">my sidebar</div>
</div>
</div>
</body>
</html>
body {
background-image: url("img/backkk9.gif");
font-size: 10px;
font-family: "Verdana",Arial,Helvetica,sans-serif;
height: 780px;
}
h1 {
font-size:2.5em;
}
h2 {
font-size:1.875em;
}
p.date {
text-align:right;
}
p.main {
text-align:justify;
}
a:link {
color: #105289;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #105289;
}
a:hover {
text-decoration: none;
color: #d31141;
}
a:active {
text-decoration: none;
color: #368AD2;
}
#wrapper {
width: 797px;
margin: 0 auto;
}
#mainbackground {
position: relative;
top: 10px;
width: 797px;
margin: 0px auto;
height: 760px;
border: 1px solid #CADCEB;
background: #ffffff;
}
#logo {
position: relative;
top: 15px;
width: 767px;
height: 122px;
margin: 0px auto;
border: 1px solid #CADCEB;
background-image: url("img/testing1.png");
}
#navbar {
position: relative;
top: 18px;
width: 767px;
height: 24px;
margin: 0px auto;
border: 1px solid #CADCEB;
background: #CADCEB;
}
#text {
position: relative;
top: 25px;
width: 600px;
left: 14px;
float: left;
height: 568px;
border: 1px solid #CADCEB;
border-right-style:none;
background: #ffffff;
}
#sidebar {
position: relative;
top: 25px;
width: 167px;
left: 14px;
float: left;
height: 568px;
border: 1px solid #CADCEB;
border-left-style:none;
background: #E1EBF2;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="SHORTCUT ICON" href="img/favicon.ico" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="mainbackground">
<div id="topnavbar"></div>
<div id="logo"></div>
<div id="navbar"></div>
<div id="text">my text </div>
<div id="sidebar">my sidebar</div>
</div>
</div>
</body>
</html>