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
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Help?: Div background image causing browser to scroll instead of just being hidden

    My site is being weird...

    I have a personal resume site that is having bg problems.

    Here is what I want to happen:

    I have a background-url for a header div and what I want to see is that when the user's browser window is less than 1024 wide, *no* scrollbar shows up at the bottom, the bg just flows out of the window.

    Here is what's happening:

    When the user's window is less than 1024, a horizontal scrollbar shows up at the bottom.

    ----------------
    Here is the url: http://danielericmullins.com

    HTML & CSS is attached in zip file.
    Attached Files Attached Files

  • #2
    Regular Coder optimus203's Avatar
    Join Date
    Sep 2008
    Location
    CT
    Posts
    317
    Thanks
    22
    Thanked 16 Times in 15 Posts
    This should do the trick (addition in bold)

    Code:
    body {
    	background-color:#e9e7dc;
    	background-image:url(http://www.danielericmullins.com/images/bgPlate.png);
    	background-repeat:repeat-y;
    	margin: 0 0 0 0;
    	width:800px;
    	overflow: hidden;
    }
    Always thank those CF Users who help you solve issues...
    Connecticut Web Design

  • #3
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've tried that, but then when the browser window is wider than 800px, the header background just stops at 800px. I want it to continue on to the right, but without scrollbars at the bottom if the browser window is less than 800. Plus, it hides the overflow on the y-axis as well (i.e., content).

    Does this make sense?

    I'm pretty sure I've seen it before ... but maybe not.

    Does anyone know if there is a way with JavaScript to prevent a horizontal scrollbar?
    Last edited by daniel0mullins; 08-11-2010 at 02:15 AM.


  •  

    Posting Permissions

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