Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member Tyler Smith's Avatar
    Join Date
    Oct 2011
    Posts
    115
    Member #
    29767
    Liked
    7 times
    Hello all,

    I am working on the website at georgiasbest.com, and I am seeing some weird display issues that I otherwise don't see on my local machine. The whole image is practically cut off! What is going on here?

    I also need to find out what I did incorrectly to center the page. Apparently margin:0 auto; isn't correct in this case.

    -Ty

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    If you want your page centered, the only way I've found to do it that works consistently is not to center the page body, but to create a container div and center it.
    Code:
    div#page-container {
        margin:  0px auto;  /* that part was right */
        width:  1000px; /* use any width you want, as long as you clearly define it, or at least clearly define a min and max width. */
    }
    Tyler Smith likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Senior Member Tyler Smith's Avatar
    Join Date
    Oct 2011
    Posts
    115
    Member #
    29767
    Liked
    7 times
    Yes, this worked:

    Code:
    body{
     background:url(gbbg.gif);
    }
    #container{
     margin:0 auto;
     padding:0;
     width:500px;
     height:763px;
     background:url(hpbg.jpg) no-repeat;
    }
    h1{
     color:#009;
     text-shadow:1px 1px 1px #000, 1px 2px 1px #03F;
     font-weight:bold;
     font-size:40px;
    }
    However, now the site is bumped down from the top about 20px when I want the image snug at the top.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    body {margin: 0; padding: 0;}

    Should do what you want.
    Tyler Smith likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Senior Member Tyler Smith's Avatar
    Join Date
    Oct 2011
    Posts
    115
    Member #
    29767
    Liked
    7 times
    Solution:

    Code:
    body{
     background:url(gbbg.gif);
     padding:0;
     margin:0;
    }
    #container{
     margin:0 auto;
     padding:0;
     width:500px;
     height:763px;
     background:url(hpbg.jpg) no-repeat;
    }
    h1{
     color:#009;
     text-shadow:1px 1px 1px #000, 1px 2px 1px #03F;
     font-weight:bold;
     font-size:40px;
     padding:30px 0 0 20px;
     margin-top:0;
    }


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:21 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com