WordPress.org

Forums

Twenty Twelve
[resolved] [closed] Twenty Twelve Nav Styling (15 posts)

  1. user1752759
    Blocked
    Posted 2 years ago #

    Quick question, simple answer...

    I'd like to text-align: center; the navigation menu but I'm not too sure where it goes in the style.css

    Ta.

  2. petegale
    Member
    Posted 2 years ago #

    That would depend on the theme you're using, how it structures the elements on your page and what classes / IDs it gives them.

    Without a link to the site you're working on, it's going to be rather difficult to answer your question.

    Pete.

  3. user1752759
    Blocked
    Posted 2 years ago #

    As it is in the topic title, I'm referring to the default twenty-twelve theme and its style.css file.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Do not edit the Twenty Twelve theme. It is will be the default theme in WordPress 3.5 and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes.

  5. Andrew
    Forum moderator
    Posted 2 years ago #

    You should avoid manipulating the theme's original files by instead using a Child Theme or Custom CSS type plugin.
    Then you'll need to add a new style, as opposed to modifying an existing style.

  6. user1752759
    Blocked
    Posted 2 years ago #

    Yes, I've created a child-theme off the twenty-twelve template that includes a style.css file...surely I can use something like .nav-menu {text-align: center;} or .main-navigation {text-align: center;} to align the navigation to the middle, as opposed to the left but as I've done this, I'm just not too sure how/where to target the right element.

  7. Andrew
    Forum moderator
    Posted 2 years ago #

    Put the CSS in the bottom of your style.css file of your Child Theme.

  8. user1752759
    Blocked
    Posted 2 years ago #

    I've put

    #site-navigation, .main-navigation, .menu-toggle, .nav-menu {
        text-align: center; float: none; padding: 0; margin: 0;
    }

    at the bottom of my style.css, nothing...

  9. Andrew
    Forum moderator
    Posted 2 years ago #

    Try using border: 10px solid red !important; to test whether your Child Theme is loading.

  10. user1752759
    Blocked
    Posted 2 years ago #

    Yes it is...I have a 10px red border around the navigation now, but no centering, thanks though for helping Andrew

  11. Andrew
    Forum moderator
    Posted 2 years ago #

    As your query is now specifically focused on CSS properties and values, you should seek support on CSS specific forums.
    http://csscreator.com/forum

  12. user1752759
    Blocked
    Posted 2 years ago #

    ...

    This is not very helpful. I should be able to edit the twenty-twelve themes navigation, aligning it to the center instead of told to go elsewhere.

  13. Andrew
    Forum moderator
    Posted 2 years ago #

    Once CSS queries become this specific, they exceed beyond the scope of WordPress forums and therefore should be asked in more relevant forums.

  14. user1752759
    Blocked
    Posted 2 years ago #

    I need support on a default theme by wordpress. I guess I'll just go elsewhere, so close this thread and any others..

  15. esmi
    Forum Moderator
    Posted 2 years ago #

    I need support on a default theme by wordpress.

    No. You're developing a custom child theme. It's not up to us to teach you how to use CSS but here are some resources to get you started:
    CSS Tutorials
    Learning CSS

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.