WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Plugin Options Style (6 posts)

  1. Arevico
    Member
    Posted 1 year ago #

    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?

  2. Eric Holmes
    Member
    Posted 1 year ago #

    What hook are you using to implement your css file? Knowing this may help us solve this issue for you.

  3. Arevico
    Member
    Posted 1 year ago #

    The hook admin enque scripts

  4. Eric Holmes
    Member
    Posted 1 year ago #

    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.

  5. Arevico
    Member
    Posted 1 year ago #

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

  6. littlestar2111
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic