WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Center post content (10 posts)

  1. Juanjo00
    Member
    Posted 1 year ago #

    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.

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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/

  3. Juanjo00
    Member
    Posted 1 year ago #

    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.

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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.

  5. Juanjo00
    Member
    Posted 1 year ago #

    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.

  6. Juanjo00
    Member
    Posted 1 year ago #

    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?

  7. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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.

  8. Juanjo00
    Member
    Posted 1 year ago #

    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.

  9. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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/

  10. Juanjo00
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic