WordPress.org

Ready to get started?Download WordPress

Forums

Minimatica
texts in posts not aligning to center but to the left? (19 posts)

  1. ninelives1980
    Member
    Posted 1 year ago #

    Don't know how to go about this one really....

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

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

  3. ninelives1980
    Member
    Posted 1 year ago #

    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.

  4. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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?

  5. ninelives1980
    Member
    Posted 1 year ago #

    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.

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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.

  7. ninelives1980
    Member
    Posted 1 year ago #

    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). :(

  8. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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.

  9. ninelives1980
    Member
    Posted 1 year ago #

    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.

  10. Andrew
    Forum Moderator
    Posted 1 year ago #

    How many posts do you have?

  11. ninelives1980
    Member
    Posted 1 year ago #

    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.

  12. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  13. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Try adding:

    h1.entry-title {
       text-align: center;
    }
  14. eideticconsulting
    Member
    Posted 1 year ago #

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

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

  15. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

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

  16. eideticconsulting
    Member
    Posted 1 year ago #

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

  17. ninelives1980
    Member
    Posted 1 year ago #

    WPyogi->
    I tried adding the following into custom css section but didn't work.
    h1.entry-title {
    text-align: center;
    }

    You mentioned "you should not be modifying any theme files - your changes will be lost when the theme is updated"

    are you referencing to modifying those CSS files in the theme's templates? If so, adding custom CSS is the only way?

    Thanks!

  18. Andrew
    Forum Moderator
    Posted 1 year ago #

    are you referencing to modifying those CSS files in the theme's templates?

    Any files changed from the theme's directory will be overwritten when the theme updates.

    It is either recommended to use a Custom CSS plugin or make a Child Theme and only modify files within that Child Theme environment.

  19. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    are you referencing to modifying those CSS files in the theme's templates

    Yes, ANY changes to ANY theme files will be lost when the theme is updated. You should use either a Child Theme or custom CSS, yes.

    But the site linked above does not appear to be using Minimatica - CSS is theme/site specific - so I would not be surprised if it's not working on a different theme.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.