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 4 of 4

Thread: Margin Limits

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    82
    Thanks
    15
    Thanked 3 Times in 3 Posts

    Margin Limits

    Hey guys!
    when I decrease my browser size from maximum to say 50%, I notice that some websites like youtube, only allow you to scroll left a certain distance, so that "Youtube" is never out of the browser. How do they do this?

    Here is my current script:

    Code:
    #page {
    	width: 1000px;
    	position: absolute;
    	left: 50%;
    	margin-left: -500px;
    	overflow-x: hidden;
    }
    Last edited by Aurora.Light; 04-24-2011 at 03:13 AM.

  • #2
    Registered User
    Join Date
    Feb 2011
    Posts
    82
    Thanks
    15
    Thanked 3 Times in 3 Posts
    hm still

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,789
    Thanks
    6
    Thanked 1,022 Times in 995 Posts
    Don’t use absolute positioning.

  • #4
    New Coder
    Join Date
    Apr 2011
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You should be using 991px instead of 1000px. Hope this will help you


  •  

    Posting Permissions

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