Grow your CSS skills. Land your dream job.

How to use different styles in uniform plugin?

  • # January 28, 2013 at 4:30 am

    Hello to everyone!

    I’m using jquery uniform plugin to create stylish form elements.

    http://uniformjs.com

    It has one spritesheet and calls every elements’ style from that.

    the problem I have is I want to create more than 1 style for every element and use them.

    for example :

    div.radio is for styling radio buttons but I want to have more styles for radios like:

    div.radio1 ,

    div.radio2

    and …

    Now how should I create that?

    I am really in need of doing this, Please help!

    Thanks in advance !

    Alireza.M

    # January 28, 2013 at 1:01 pm

    You could use the CSS `:nth-of-type()` selector, but note that it only works in modern browsers:

    div.radio:nth-of-type(1) {
    // Specific styling for the first radio.
    }

    # January 30, 2013 at 3:43 am

    How can I use another classes?

    Is it possible to change javascript file to calls different css classes?

    # February 2, 2013 at 6:16 pm

    I tried different ways but as I want it to work in all browsers I couldn’t make it work.

    I’ll apperciate if anyone help to get what is in my mind.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".