WordPress.org

Support

Support » How-To and Troubleshooting » centering content

centering content

Viewing 10 replies - 1 through 10 (of 10 total)
  • margin: auto; or text-align: center; may help you.

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

    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.

    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.

    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.

    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…..

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

    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.

    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!!

    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 . . .

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘centering content’ is closed to new replies.
Skip to toolbar