WordPress.org

Ready to get started?Download WordPress

Forums

centering content (11 posts)

  1. visual mechanics
    Member
    Posted 2 years ago #

    I am having trouble getting the entry content to float on the page centered no matter what the browser width. What attribute and div controls this?

    http://francescaromeo.com/blog

  2. Jonas Grumby
    Member
    Posted 2 years ago #

    margin: auto; or text-align: center; may help you.

  3. visual mechanics
    Member
    Posted 2 years ago #

    would either of these attributes go with .entry-content div?

  4. Jonas Grumby
    Member
    Posted 2 years ago #

    You will have to figure that out. If you have Firefox, try the Firebug add-on. It will show you the CSS attributes of whatever page element you select, and you can try changing them without actually committing the changes to your site.

  5. visual mechanics
    Member
    Posted 2 years ago #

    yeah, I have been using firebug to trouble shoot, no luck applying these attributes to any of the tags. have applied to #content, .body, .entry-content, .entry-content p , etc.

  6. Jonas Grumby
    Member
    Posted 2 years ago #

    Try using a div ID instead of a class. Right now the margin is 0 0 0 10% and that is being applied correctly. If I change it to 0 auto or just auto in Firebug, it moves to the left. For some reason it's escaping me as well at the moment.

  7. visual mechanics
    Member
    Posted 2 years ago #

    i noticed if i change the #content margin settings to 0 auto it centers it but then the key line is reduced to 720px instead of following the 100% width of the page. compromise.....

  8. Jonas Grumby
    Member
    Posted 2 years ago #

    There are other things wrong with your theme, like things that are supposed to be in the <head> section appearing below the <body> tag.

  9. Jonas Grumby
    Member
    Posted 2 years ago #

    You've got #container set to float: left; and width: 100%;

    You've got lots of wrapper and container divs that don't necessarily need to be there.

    Your sidebar div is inside your nav div. There's a whole lot of craziness going on there.

  10. cjeangrover
    Member
    Posted 2 years ago #

    Help! I am having a similar problem with my site, and I have a deadline. This should be a no-brainer, I'd think, but it is stumping me.

    Site url: http://www.inspirit-int.com/new

    The home page and the "blog" page are doing what I want; namely, moving with the background image horizontally if the browser window is open wide horizontally. I have the header set up in the background, then a placeholder header png to hold the header widget, which is the custom search box. I want the page content not to stick to the lefthand side, but to center.

    Please help!!

  11. cjeangrover
    Member
    Posted 2 years ago #

    Never mind . . . solved it. There was one bad line of code in my #header_widget area . . . I had input, at some point

    width:40%;

    there, and it totally negated anything I had done to try to center the site. Go figure. Maybe this can help someone else . . .

Topic Closed

This topic has been closed to new replies.

About this Topic