Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2012
    Posts
    102
    Thanks
    2
    Thanked 5 Times in 4 Posts

    Why do i get a scroll bar when using position relative?

    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.
    Oh forgot to give my code lol

    HTML
    Code:
    <!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
    Code:
    body {
    background-image:url('images/background.jpg');
    background-repeat:repeat;
    }
    #logo {
    position:relative;
    top:50px;
    left:10px;
    }
    Last edited by bigcasey123; 08-02-2012 at 05:27 AM.

  • #2
    New to the CF scene
    Join Date
    Aug 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Coeur Real Estate

    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>

  • #3
    Regular Coder
    Join Date
    Mar 2012
    Posts
    102
    Thanks
    2
    Thanked 5 Times in 4 Posts
    Quote Originally Posted by juliarose View Post
    You try to fix :
    Code:
    body {
    background-image:url('images/background.jpg');
    background-repeat:repeat;
    width:100%;
    }
    Thanks but i just found away pass.
    Code:
    #logo {
    background-image:url('images/logo.png');
    background-repeat:no-repeat;
    height:100px;
    width:300px;
    position:relative;
    left:500px;
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •