www.webdeveloper.com
Results 1 to 5 of 5

Thread: CSS Centering Problem

Hybrid View

  1. #1
    Join Date
    Aug 2009
    Location
    Victioria, B.C. CANADA
    Posts
    7

    CSS Centering Problem

    Hello,

    I just built an opt-in page here:

    http://freedomfreelancewriting.com/

    My problem is that the page is left justified and I want it to be centered in the browser. Can someone tell me how to do this?

    Thanks

    Nathan

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Try changing:
    <div id="container">

    to:

    <div id="container" style="margin:0px auto; text-align:center;">
    54 68 65 42 65 61 72 4D 61 79

  3. #3
    Join Date
    Mar 2010
    Posts
    2,803
    I don't normally click posted links because of this (post #2).

    But I use something like this to centre the content of my web pages.

    Code:
     
    <style type="text/css">
     
    #wrapper {
    width: 70&#37;;
    margin: 0px auto 0px auto}
     
    </style>
     
    <body>
            <div id="wrapper">
     
                <!-- put all your page content in here -->
     
            </div>
    </body>

  4. #4
    Join Date
    Aug 2009
    Location
    Victioria, B.C. CANADA
    Posts
    7

    Got it

    Thanks, that seems to have done the trick. I'll know for sure once I upload it. Still, so far, so good.

    Nathan

  5. #5
    Join Date
    Mar 2010
    Posts
    2,803
    no problem - happy to help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles