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 7 of 7
Like Tree1Likes
  • 1 Post By Ronald Roe

Thread: Site Page Alignment

  1. #1
    Junior Member
    Join Date
    Mar 2014
    Posts
    3
    Member #
    38644

    Question Site Page Alignment

    I don't know what happened because I created this site a year ago and it was centered on the browser window. Then I looked at it a couple of months ago and realized it's left aligned. So I looked at my css stylesheet and it is a 0 margin but I don't know what is wrong. In DW CS6 it is centered, the code looks fine to me....

    Can someone help me please and take a look at my site source code?

    Caitlin FitzGerald Designs

    Thanks, it's annoying that I can't find it and is bothering me because I do this for a living and wow, I can't even center my own site? LOL. Thank you in advance.

  2.  

  3. #2
    Junior Member
    Join Date
    Mar 2014
    Posts
    3
    Member #
    38644
    K, no response, I'm assuming it's probably because no one wanted to look at the source code on the page...

    Here's my stylesheet. The actual HTML code is not long...

    @charset "utf-8";
    body {
    font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
    margin: o auto;
    padding: 0;
    color: #654B4B;
    background-color: #FFF5DE;
    width: 960px;
    }
    .footer {
    font-size: x-small;
    font-family: Georgia, "Times New Roman", Times, serif;
    color: #654B4B;
    text-align: right;
    }


    ul, ol, dl
    padding: 0;
    margin: 0;
    }
    h1, h2, h3, h4, h5, h6, p {
    margin-top: 0
    font-size: small;
    }
    a img
    border: none;
    }

    a:link {
    color:#414958;
    text-decoration: underline;
    }
    a:visited {
    color: #4E5869;
    text-decoration: underline;
    }
    a:hover, a:active, a:focus {
    text-decoration: none;
    color: #000;
    }

    .container {
    background-color: #FFF5DE;
    margin: 0 auto;
    display: box;
    width: 960px;
    }

    .content {
    padding: 10px 0;
    color: #654B4B;
    background-color: #FFF5DE;
    width: 900px;
    margin: 0 auto;
    display: block;
    }
    .container .content #form1 {
    font-family: Verdana, Geneva, sans-serif;
    font-size: small;
    font-weight: lighter;
    background-image: url(pics/runningsurfboard.jpg);
    background-repeat: no-repeat;
    background-position: right;
    padding: 2px;
    margin-right: 15px;
    margin-left: 15px;
    margin-top: 2px;
    height: 300px;
    }

    .imgcentered {
    margin: 0 auto;
    ;
    display: block;
    }


    .content ul, .content ol {
    padding: 0 15px 15px 40px;
    }


    .fltrt {
    float: right;
    margin-left: 8px;
    }
    .fltlft {
    float: left;
    margin-right: 8px;
    }
    .clearfloat {
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
    }
    .container .content icons {
    text-align: left;
    }
    .container .footer table tr td div p {
    font-size: x-small;
    }
    .container .content .bgimg {
    text-align: left;
    height: 670px;
    width: 960px;
    display: block;
    margin: 0 auto;
    }
    .portfoliopg {
    display: block;
    margin: 0 auto;
    }

    .container .content p imgbg {
    background-image: url(pics/surferbg.png);
    background-repeat: no-repeat;
    text-align: left;
    display: block;
    height: 800px;
    width: 730px;
    background-position: center;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
    }


    .container .content {
    font-style: normal;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 10px;
    color: #654B4B;
    }
    .container .content .servicetext p em {
    font-size: small;
    }
    .container .content p detail {
    font-size: small;
    }

  4. #3
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    I hadn't seen this thread before. Anyway, on line 4 of stylesheet.css, you have
    Code:
    margin: o auto
    That should be
    Code:
    margin: 0 auto
    You used the letter "o" instead of a zero.
    TheGAME1264 likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    I never saw the thread. That's my excuse.

    Anyway, what Ron said.
    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
    Junior Member
    Join Date
    Mar 2014
    Posts
    5
    Member #
    38688
    Ok im no expert. But shouldn't the code in the container be margin-right:auto; margin-left:auto;?

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    That would work as well...but that's the long version of Ron's shorthand version.
    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)

  8. #7
    Junior Member
    Join Date
    Mar 2014
    Posts
    3
    Member #
    38644
    Quote Originally Posted by Ronald Roe View Post
    I hadn't seen this thread before. Anyway, on line 4 of stylesheet.css, you have
    Code:
    margin: o auto
    That should be
    Code:
    margin: 0 auto
    You used the letter "o" instead of a zero.
    Now it's my turn to apologize because I haven't checked this since then. I had thought I had email notifications turned on. Anyway....

    Thank you so much! Good eye, much appreciated.


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