1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

newb type CSS question

Discussion in 'HTML & JavaScript' started by SuperDuran, Aug 28, 2012.

  1. SuperDuran

    SuperDuran Newbie

    Joined:
    Apr 18, 2012
    Messages:
    41
    Likes Received:
    14
    Hello everyone!

    I'm having a hard time centering my web site. I am use the Business Card theme from Elegant Themes. (first link when googling "business card elegant themes")

    I pin pointed the culprit to this code below in the main css file.

    Code:
    #page-wrap { width: 810px; margin: 0 auto; position: absolute; top: 25%; left: 20%; }
    I figured if I do,

    Code:
    #page-wrap { width: 810px; margin: 0 auto; }
    
    I get my site centered horizontally. Though I would like that 25% padding on the top which I had before. How do I go about doing that? For the life of me I can't figure it out. I know the crude way would be put a few BR codes (new line) to get the site pushed down a bit, but don't want to go that route.

    Any help appreciated!
     
  2. ice41

    ice41 Power Member

    Joined:
    Aug 18, 2012
    Messages:
    783
    Likes Received:
    248
    Occupation:
    Web Designer
    Location:
    Land of Pineapples
    Use this

    position: absolute; top: 25%;
     
    • Thanks Thanks x 1
  3. Arjeen

    Arjeen Regular Member

    Joined:
    Aug 22, 2012
    Messages:
    275
    Likes Received:
    16
    Location:
    Verona (ITALY)
    Code:
    #page-wrap { position: absolute; top: 25%; width: 810px; margin: 0 auto; }
     
    • Thanks Thanks x 1
  4. Blackberry_11

    Blackberry_11 Regular Member

    Joined:
    Apr 17, 2011
    Messages:
    266
    Likes Received:
    19
    You can use the padding code to do what you are trying. If you add that attribute to your code then you will get your desired result.