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 4 of 4
  1. #1
    Junior Member
    Join Date
    Dec 2008
    Posts
    9
    Member #
    17937
    I have a strange margin at the top of my page, and i am not really sure where it is coming from.

    www.firelightstudio.net/virulent/home.html

    Maybe ive been looking at it too long. I just cant seem to figure out why it is doing this.

  2.  

  3. #2
    Senior Member diddy's Avatar
    Join Date
    Jun 2008
    Location
    Sydney, Australia
    Posts
    502
    Member #
    16955
    I found the problem. It's in your CSS. In your first few lines of CSS, your body is as follows:
    Code:
    body {
     margin: 0;
     padding: 0;
     text-align: center;
     font-family: Verdana, Arial, Helvetica, sans-serif;
    }
    That wasn't the problem. So I looked further down in the CSS, and found a second body code, (for me, on line 54)
    Code:
     
    /*--------------------------Body styles begin here---------------------------------------*/
    body {
     background-image:url(gradient2.jpg);
     background-color: #2B2B2B;
     background-repeat: repeat-x;
     }
    What I think has happened here, is that you've updated the body properties here from the ones in your first few lines of CSS. But you haven't changed any. You've just added more stuff but left out the existing code. Try to have only one body tag with every style inside that. But for now, the fix is simple. Just add margin: 0; padding: 0; to your second body, like so:
    Code:
     
    /*--------------------------Body styles begin here---------------------------------------*/
    body {
     background-image:url(gradient2.jpg);
     background-color: #2B2B2B;
     background-repeat: repeat-x;
     margin: 0;
     padding: 0;
     }

  4. #3
    Junior Member
    Join Date
    Dec 2008
    Posts
    9
    Member #
    17937
    Yep, that works perfectly. I am not sure why i didnt add the zeroing of margin and padding to that line. Also kept missing it because i was looking up at my first body tag. Thanks a bunch!

  5. #4
    Senior Member diddy's Avatar
    Join Date
    Jun 2008
    Location
    Sydney, Australia
    Posts
    502
    Member #
    16955
    glad to be of help


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 09:39 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com