WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Center post content

[Resolved] Center post content

  • Hi, my webpage is http://edmw.com.ar/ and I would like to know how can I center all the content in my posts (text, images and videos in some cases). I would like to know if there’s a code or something that I could add somewhere. I mean, I dont wanna add a code in EVERY single post to get them centered (I have almost 1400 posts).

    Thanks in advanced.

Viewing 9 replies - 1 through 9 (of 9 total)
  • WPyogi
    Forum Moderator

    @wpyogi

    It looks like adding this to your CSS (best done in a Child Theme or custom CSS option or plug-in so that your changes are not erased when the theme is updated) may work:

    .blogItem img {
       display: block;
       margin: 0 auto;
    }

    For further help, you may want to try the dedicated forums for your theme here:

    http://www.s5themes.com/forums/

    I have just added it in the “Stylesheet (style.css)” but didn’t work. Also tried in another webpage but didn’t work neither. Moreover I added it into “theme options->Custom CSS” (of the second webpage) but still nothing.

    WPyogi
    Forum Moderator

    @wpyogi

    I don’t see it in your style.css file, and don’t see any custom CSS. Do you have any caches? Make sure you clear them after making any changes.

    Hoo sorry, my bad. After watching that it didnt change anything I deleted it. I have just added it again, on bottom of the style.css. I will now search on how to clear caches to see if that’s the problem.

    Lol im soo noob, sorry, I didnt realised that the code was to centrate just the images, thanks. And if I want to centrate the text?

    WPyogi
    Forum Moderator

    @wpyogi

    Try this:

    #content p {
       text-align: center;
    }

    That will center any text that’s inside a p tag in the content section of your pages.

    Wow, it worked too. I have been searching these codes on the internet for about an hour but it didnt work. Thank you very much.

    WPyogi
    Forum Moderator

    @wpyogi

    You’re welcome. The best way to work with CSS is by using Firebug — which will show you the code you need to change. This is also a good CSS reference site:

    http://www.w3schools.com/css/

    Nice, I’ll add them to Favs and I’ll read what are they about. Thanks once again.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] Center post content’ is closed to new replies.