Support » Theme: Leaf » How to align content on sidebar?

  • Hi, first of all, great job with this theme. I can’t begin to describe how simple and elegant it is.

    I have a problem though, I searched the entire style.css and I can’t find the alignment of the sidebar, the widget area. I would love to have all my widgets and links there centered, but I’ve been searching for so long and I can’t do it.

    Thank you so much in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • .widget-area .widget .textwidget, .widget-area .widget p, .widget-area .widget li {
        text-align: center;
    }

    Add the above code to the `style.css’ of your CHILDtheme:

    You don’t have a childtheme yet?

    1. Install and activate ‘one click childtheme plugin
    2. create the childtheme
    3. activate the childtheme
    4. Make the changes in the CHILDtheme!
    – copy php files / css-file(s) of the original theme [as required] to the childtheme directory and edit them as required.

    == == ==
    BTW:

    About finding out ‘which things to change in your site [css / html / php]

    Well it’s all a bit like trying to solve a puzzle.
    Fortunately there are good tools for that.
    In your browser: Install / activate webdevelopment add-ons / plugins.

    Recommended: ‘Firebug’ and ‘webdeveloper: http://www.chrispederick.com
    These tools will show you what’s what.
    e.g. right-click > inspect elements > click left bottom arrow-icon
    click item in webpage
    Inspect css on the right
    alter css values to test effect / result
    OK? copy altered css rule
    paste it in the style.css of your childtheme.

    Alternatively:
    Press <F12> a screen will show in the bottom.
    Move the mouse over each line
    The area shows in the top-half
    Press + to unfold parts
    Investigate and alter on the right etc.
    paste it in the style.css of your childtheme.

    Leaf theme has built-in custom CSS – so no need to make a child theme unless you are making more extensive changes to theme files. Under theme options, copy the code in the above post to the Custom CSS box.

    …and it has also a child theme ready to download, in the case mentioned by WPyogi

    @w.P. Ginfo That rule center text but not widget title.
    #secondary.widget-area.three.columns {text-align:center;}
    it’s better.
    Or you can add .widget-title, .widget-title span to previous rule, but without URL is hard to tell.
    @ncroma If you use Firebug you can do it by yourself.

    Thread Starter NCRoma

    (@ncroma)

    Thanks @ everyone! @tizz your tip worked! I find no need for a child theme so far, but it was a good thing to learn. I use chrome so inspect element has been working fine so far!

    Now I have encountered another litle problem:

    In my menu, I am using dropdown menus for multiple pages. I’d like to know if it is possible to do any of these 2 tweaks:

    1st- When a menu has a child, the menu button has an arrow showing it has a dropdown. I’d love to remove that arrow on the button text, but still have the dropdown.

    2nd- Is it possible to make a parent menu button have no link to no page? That button would only serve to show the dropdown and its childs, wich would then be links to pages on my WP site. Clicking that parent menu button would not direct you to any page, only show its dropdown.

    I hope I have made myself understandable! Thank you so much in advance I love the feedback of this comunity is awesome. Keep it up and thanks again!

    1. .sf-sub-indicator {display: none;}
    (you could have done this using Firebug or Chrome)

    2. This is a not related theme question, use Custom Menu
    In custom link, write anything after http:// – give it a label name and add to menu. Now delete only the URL and add child pages as you want
    Remember to save menu

    And THIS is the URL to leaf child theme, only if you need to change theme files.
    If you do, read in Codex about the use of child themes.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to align content on sidebar?’ is closed to new replies.