...

View Full Version : Resolved Why do i get a scroll bar when using position relative?



bigcasey123
08-02-2012, 04:09 AM
I use relative allot cause it makes my website look the same on ALL resolutions and browsers. But for some reason when i use it now it gives me a scroll bar. When i use absolute it takes away the scroll bar but absolute doesn't look the same on all resolutions. How can i fix this? Here is a pic of the problem.http://i50.tinypic.com/2889qhz.jpg
Oh forgot to give my code lol

HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<link rel="stylesheet" type="text/css" href="style.css" />
<title>smallupload.net</title>
</head>
<body>

<div id="logo">
<img src="images/logo.png" alt="logo"/>
</div>
</div>
</body>
</html>


CSS

body {
background-image:url('images/background.jpg');
background-repeat:repeat;
}
#logo {
position:relative;
top:50px;
left:10px;
}

emon2000
08-02-2012, 04:21 AM
Welcome to the online home of STL Today Realty, the #1 website for all of your realty needs in the St. Louis area. Our site’s property search, easy navigation and experienced team will make finding your next home or selling your current home as easy as possible.For more info
Just click on<a href=”http://www.stltodayrealty.com/”> real estate in St Louis</a>

bigcasey123
08-02-2012, 04:27 AM
You try to fix :


body {
background-image:url('images/background.jpg');
background-repeat:repeat;
width:100%;
}


Thanks but i just found away pass.


#logo {
background-image:url('images/logo.png');
background-repeat:no-repeat;
height:100px;
width:300px;
position:relative;
left:500px;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum