WordPress.org

Ready to get started?Download WordPress

Forums

Minimatica
Center Bottom Footer (16 posts)

  1. lRlevolution
    Member
    Posted 2 years ago #

  2. peredur
    Member
    Posted 2 years ago #

    The most usual way to center a block element in CSS is to give it a width and then set its margins to "auto". That means that you need to be absolutely certain that the width of the block - your menu in this case - is never going to change (e.g. if a new menu item is added or an old one deleted), because if it does change, you will have to alter the width in your CSS. It's for this reason that menus are usually aligned left or right, rather than being centered.

    Cheers

    PAE

  3. lRlevolution
    Member
    Posted 2 years ago #

    can you walk me through it. im not sure how exactly how to edit what im doing

  4. peredur
    Member
    Posted 2 years ago #

    What I'm saying is that it can't be done. Unless you can be absolutely certain that you're never going to add a new menu item to your menu, or delete an old one.

    If you *are* sure of that, post again and I'll tell you what to do. Although I can't really see how you can be sure, to be honest.

    If you're determined to do it, though. The first thing you need to do is to look up Child Themes in the WordPress Codex. Child themes are the only recommended way of modifying themes.

    Cheers

    PAE

  5. lRlevolution
    Member
    Posted 2 years ago #

    im positive. this theme only allows 1 menu to begin with and wont be deleted, but maybe added more things to it. I already have a child theme set up

  6. peredur
    Member
    Posted 2 years ago #

    Just to be clear. I'm talking about adding, editing and deleting items from your single menu. You have to be clear that you'll never do it unless you want to re-style the menu every time. If you center the menu with this number of items using this wording, any alterations will change the width and you'll have to alter your style sheet to compensate.

    Also I don't understand how you can be using a child theme when your pages are still linking to the mimatica theme style sheet and not to your child theme's style sheet. But I assume you know what you're doing. Perhaps you mean you've set it up but not activated it yet...

    HTH

    PAE

  7. lRlevolution
    Member
    Posted 2 years ago #

    sounds good to me. Maybe you can also help me with the positioning of the qTranslater also. im trying to place the drop down menu on the top right header instead of me using it as a widget in the footer area.

  8. peredur
    Member
    Posted 2 years ago #

    Add this to the end of your child theme's style sheet:

    .nav ul {
      margin: auto;
      width: 745px;
      float: none;
      padding-top: 1em;
    }

    You may have to do a bit of trial and error on the width, but 745px worked for me in Firebug. 744px didn't.

    Que te salga bien.

    Cheers

    PAE

  9. peredur
    Member
    Posted 2 years ago #

    Dunno about the translator. I guess you could look at the generated code and put that code somewhere else. Or you could look in the widget's code to see what function(s) get(s) called to generate the code and then call that in some other place.

    If you're really desperate, you could look in the plugin's documentation.

    ;-)

    I use the WPML plugin for my multi-lingual sites. So I don't really know about this one, or what options it offers.

    Un saludo

    PAE

  10. lRlevolution
    Member
    Posted 2 years ago #

    750 worked like a charm. thank you.

    Now anyway you can help with the Qtranslater. im trying to place it in my header instead of using it as a widget.

    any ideas?

  11. peredur
    Member
    Posted 2 years ago #

    Yeah. Just thought. Another problem you're going to have with the menu if you center it in the way I've described is that it may be different widths in different languages (in fact it almost certainly will). So you may have to compromise by centering the widest instance. The others will then be, slightly, offset to the left.

    Un saludo

    PAE

  12. peredur
    Member
    Posted 2 years ago #

    Translator. See earlier post. They crossed.

    PAE

  13. lRlevolution
    Member
    Posted 2 years ago #

    Ok so i got everything i need to know, except one thing and im hoping you can help. If i wanted to change a active link color in all the pages except the home page how would i go about to do that?

  14. peredur
    Member
    Posted 2 years ago #

    Call this function inside the HTML for the body (probably in header.html if your theme follows the usual pattern). You can then create a CSS for something like body.home

    Or, as it stands, you could create a rule for body.page-id-429, if you wanted, as long as the home page will always be the page with id 429.

    HTH

    PAE

  15. lRlevolution
    Member
    Posted 2 years ago #

    i have a css class called .page. whats the code to have the active link a certain color for css?

  16. peredur
    Member
    Posted 2 years ago #

    Probably something like:

    .page a:active {
      color: /* whatever color code you choose */
    }

    You should be aware, though, that an active link is a link having the pointing device hovering over it and the button on the device pressed down.

    The other states for links are:

    a:link - a link that has not been visited
    a:visited - a link that has been visited
    a: hover - a link over which the pointing device is hovering (but not clicking)

    You usually need to create a rule for each state, but if you want to refer to all states, you can do, in your case:

    .page a {
    ...
    }`

    Personally I don't like that. I prefer to be specific:

    .page a:link {...}
    .page a:visited {...}
    .page a:hover {...}
    .page a:active {...}

    If you want the same values to apply to many states (e.g. for links and visited links to look the same) you specify the two selectors in one rule such as:

    .page a:link,
    .page a:visitied {
      ...
    }

    You should specify link rules in the order above (link, visited, hover, active). It's the only place in CSS where order matters like this. To remember the order, remember LoVe HAte).

    HTH

    PAE

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic