WordPress.org

Support

Support » Plugins and Hacks » Hacks » [Resolved] Plugin Options Style

[Resolved] Plugin Options Style

  • Hi,

    I need some help with styling my options page. The problem is that I’ve registerd and enqueued some css rules. However, in the admin area there are some styles dynamically loaded via this rule:

    <link rel=’stylesheet’ href=’http://127.0.0.1/wp-plugin-dev/wp-admin/load-styles.php?c=1&dir=ltr&load=admin-bar,wp-admin&ver=3.4.1′ type=’text/css’ media=’all’ />

    Thus these styles are overriding my enqueued rules.

    Is it possible to enque my styles AFTER this line, so it gets applied last. Preferably in a reliable fashion?

Viewing 5 replies - 1 through 5 (of 5 total)
  • What hook are you using to implement your css file? Knowing this may help us solve this issue for you.

    The hook admin enque scripts

    You need to be more specific in your styling then, to push priority over the default styles.

    Example:

    if the default style is:

    ul {
        margin:0;
    }

    Use this:

    div ul {
        margin-left: 20px;
    }

    By adding more classes/IDs or even parent tags into the CSS argument, it will rank higher by being more specific – which will override the default styles.

    Thanks, that should work. so If two selectors apply to the same element, the one with higher specificity wins. I always tought it was a matter of last style get applied, glad to learn something new 🙂

    Hi,
    Could you let me know how to turn on the Styling Option, General Option, Blog Option, Portfolio Page.
    It allowed me to see their inside options and modified yesterday. However, today, when i click the Styling Option, it does not open any options for me any more.
    Pls help.
    Thanks,
    Tina

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Plugin Options Style’ is closed to new replies.
Skip to toolbar