SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Addict
    Join Date
    Jun 2009
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Center whole blog

    Hi,

    I'm looking to center my whole blog..like.. http://i45.photobucket.com/albums/f56/p ... 110044.png

    Not sure how to figure this out.. I can center it but then the text in the blog gets centered when I need everything centered except the text which should remain in align left..

    Anyone know how to do this?

    Thanks

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,287
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Your link to the image seems to be corrupt I'm afraid.

    It would be easier if you have a link to the page anyway as we would need to see your code.

    The faq has a basic entry on centering an existing page here that may be of some use.

  3. #3
    SitePoint Enthusiast J32's Avatar
    Join Date
    Mar 2009
    Location
    Seoul
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could be probably done with a simple margin:0 auto;

    Your site and code would be helpful though

    Visit us at J32Teez or Business-Cards.uni.cc
    Follow me on Twitter @J32Teez

  4. #4
    SitePoint Addict
    Join Date
    Jun 2009
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    site is http://www.leehughes.co.uk/newsite/blog-2/

    I was using #content {margin-left:auto; margin-right:auto;}

    But that didn't work

  5. #5
    SitePoint Addict
    Join Date
    Jun 2009
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  6. #6
    SitePoint Enthusiast J32's Avatar
    Join Date
    Mar 2009
    Location
    Seoul
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by leehughes View Post
    Hi,

    site is http://www.leehughes.co.uk/newsite/blog-2/

    I was using #content {margin-left:auto; margin-right:auto;}

    But that didn't work
    try #content {margin:0 auto;}

    btw. your site shows centered in Firefox 3.6.3 and IE8 ...seems like you made it work.

    Visit us at J32Teez or Business-Cards.uni.cc
    Follow me on Twitter @J32Teez

  7. #7
    SitePoint Addict
    Join Date
    Jun 2009
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    really? i'm not getting it in chrome and firefox 3.63 mac even with new code..

  8. #8
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,287
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    I'm a little confused as your page already looks centred to me.

    If you are talking about #content then you have set it to 100% wide so it will fill all the way across the parent and cannot be centred. You would need to give a specific width to #content and then use margin:auto as already mentioned.

    e.g.
    Code:
    #content  {
    margin:auto;
    width:600px;
    
    
    }
    Not sure if that was what you wanted though

  9. #9
    SitePoint Addict
    Join Date
    Jun 2009
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry not my page.. i meant my content haha..

    I'm looking to shift the blog posts texts into the center..

    http://www.leehughes.co.uk/newsite/blog-2/

    Or, that code applies to what I said however, I am not getting the text centered.. it's still on the left.. I will clear the cache on my browsers

  10. #10
    SitePoint Addict
    Join Date
    Jun 2009
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That new code shifted the text.. Just need to find the right number for center

    Cheers


Bookmarks

Posting Permissions

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