WordPress.org

Support

Support » Themes and Templates » Minimatica » texts in posts not aligning to center but to the left?

texts in posts not aligning to center but to the left?

Viewing 15 replies - 1 through 15 (of 18 total)
  • WPyogi

    @wpyogi

    Forum Moderator

    Text generally aligns to the left by default – but for any help, we’d need to see what you are talking about.

    hey, thanks
    it’s at http://songspursuit.com/mayday/

    the texts would stay aligned to the left, even after i remove the call to sidebar.

    WPyogi

    @wpyogi

    Forum Moderator

    The sidebar is still on that page…

    <div id="sidebar" class="widget-area" role="complementary">
    <aside id="nav_menu-2" class="widget widget_nav_menu">
    <div class="menu-menu-container">

    How did you try to remove it?

    Hmm, I purposefully placed the sidebar back* on cos I couldn’t find a way to align the texts to the center (I seen one other guy do it, but I’m not sure how he managed to).

    *cos even without the sidebar, the texts are aligning to the left, as if with a sidebar still present.

    WPyogi

    @wpyogi

    Forum Moderator

    Generally, you need to remove the call to the sidebar in the template file(s), and then adjust the CSS code accordingly so that the content section fills the page.

    Hmm okay 🙂

    I know how to remove the call to the sidebar – but am not sure as to which files I have to go to, to edit the CSS codes (to align the contents within my posts). 🙁

    WPyogi

    @wpyogi

    Forum Moderator

    You don’t “go to” any file to edit CSS – you need to use a browser tool like Firebug to find the relevant CSS and/or HTML (to add new CSS if needed) – and then COPY/CREATE the new CSS in the child theme style.css file. Those styles (done correctly) will override the existing CSS.

    Any changes to template files should also be done only in the child theme.

    I downloaded the Firebug – and I still can’t quite figure out yet. Clicked on some sections of the texts in my posts to find out how to align them to the centre.

    Anyway, I wish to have the texts in all of my posts to be aligned to the centre instead of leaning to the left side.

    How many posts do you have?

    Just two at the moment, but plan to add more in the future – so, my plan is to have a code inserted which will effect all posts to be done in the future.

    See this article regarding CSS centering http://www.w3.org/Style/Examples/007/center.en.html

    WPyogi

    @wpyogi

    Forum Moderator

    Try adding:

    h1.entry-title {
       text-align: center;
    }

    I edited my CSS as such and obtained the desired results.

    #content {
    margin-left: auto;
    margin-right: auto;
    width:700px;
    }

    WPyogi

    @wpyogi

    Forum Moderator

    @eideticconsulting – you should not be modifying any theme files – your changes will be lost when the theme is updated.

    @wpyogi – Thank you for the feedback! I maintain revision backups of the site, but I will definitely avoid this unless absolutely necessary.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘texts in posts not aligning to center but to the left?’ is closed to new replies.
Skip to toolbar