j5grady
10-07-2005, 09:04 PM
alright, so when there isn't a scrollbar on the side, the div is in the correct position, therefore - i'm happy
then when there is a scrollbar, the div seems to move about 5px to the left
can anybody tell me why?? i'm really lost
<a href="http://img.photobucket.com/albums/v258/J5Grady/good.jpg" target="new">Good...</a>
<a href="http://img.photobucket.com/albums/v258/J5Grady/bad.jpg" target="new">Bad...</a>
luvhartz
10-07-2005, 09:21 PM
can you post the actual codes your using, just seeing it we cant do much
j5grady
10-07-2005, 09:28 PM
<html>
<head>
<style type="text/css">
<!--
body {
background-image : url(bg.jpg);
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#layout {
background-image : url(flowers.jpg);
width: 773px;
height: 500px;
position: absolute;
top: 0px;
left: 1%;
margin: 0px;
padding: 0px;
}
#navi {
width: 731px;
position: absolute;
top: 48.4%;
left: 1.4%;
margin: 0;
padding: 0;
}
#main {
background: #000;
width: 468px;
position: absolute;
top: 51.9%;
left: 27.2%;
margin: 1px;
padding: 1px;
font-size: 8pt;
font-family: trebuchet MS;
font-weight: none;
}
#menu {
background: #000;
width: 212px;
position: absolute;
top: 51.9%;
left: 1.5%;
margin: 1px;
padding: 1px;
font-size: 8pt;
font-family: trebuchet MS;
font-weight: none;
}
a:link, a:active
{
text-decoration: none;
font-weight: bold;
color: #000;
}
a:hover
{
text-decoration: none;
font-weight: bold;
color: #000;
}
a:visited
{
text-decoration: none;
font-weight: bold;
color: #000;
}
#linkone {
background: #95E1FF;
margin-bottom: 2px;
padding-left: 2px;
width: 738px;
}
#linktwo {
background: #DFF7FF;
margin-bottom: 2px;
padding-left: 2px;
width: 738px;
}
-->
</style>
</head>
<body>
<div id="layout"></div>
<div id="navi"><img src="navigation.jpg"></div>
<div id="menu"></div>
<div id="main"></div>
</body>
</html>
sorry if it's a bit long...
kittycat
10-07-2005, 10:15 PM
Could be because you're using percentage to position instead of absolute numbers. When there's a scrollbar, the page area is slightly less than without one, so the percentage will be slightly smaller and the div will move to the left.
Try positioning with numbers instead, it should solve the problem
j5grady
10-07-2005, 10:21 PM
thanks, ill try that
and that is so weird because i was advised by someone to use percentages instead of numbers :-P
ill let you guys know if it works out
j5grady
10-07-2005, 10:43 PM
alright, now i have another question - it's still a few px off when i use the code in explorer, is there anyway i can make just one code for the entire thing without having to use px values with firefox and percentage values in explorer?