• Resolved nimas

    (@nimas-1)


    Hi,
    Is there a way to target the CSS of a specific form’s field labels?

    I tried this:

    .um .um-field-username .um-field-label, .um .um-field-password .um-field-label {
    color:#ffffff;
    }

    But it applies the changes to all forms, globally..

    I have tried using the form ID within the CSS but it doesn’t work. Any ideas?
    Thanks!

    • This topic was modified 3 years, 12 months ago by nimas.
    • This topic was modified 3 years, 12 months ago by nimas.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Towhid

    (@cryptex_vinci)

    Hi @nimas-1

    If you analyze the css class then you will find that the each form has a unique css class. For example, If the the form id is 6, then you will find that the html looks like this

    <div class="um um-register um-6 uimob500">

    Thanks

    Thread Starter nimas

    (@nimas-1)

    Hi @cryptex_vinci

    Thanks for the reply. Yes, I tried this and structured the CSS to include this class and it still didn’t work.

    .um um_field_24795_username .um-field-label, .um um_field_24795_user_password .um-field-label {
    color:#ffffff;
    }

    I thought this would work? Any ideas?

    Thanks!

    Plugin Support Towhid

    (@cryptex_vinci)

    Hi @nimas-1

    Can you please share the live link of the form.

    Thanks

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @nimas-1

    What happens when you !important to the color?

    .um um_field_24795_username .um-field-label, .um um_field_24795_user_password .um-field-label {
       color:#ffffff !important;
    }
    

    Regards,

    Thread Starter nimas

    (@nimas-1)

    Hi @cryptex_vinci
    Thanks for that. The live site is https://mittareinsurance.com/login/
    Appreciate you taking a look!

    Thread Starter nimas

    (@nimas-1)

    HI @champsupertramp
    I tried that and it doesn’t work. I also looked for CSS elsewhere that may be overriding this and there is nothing. It is the “Default” login form, would that make a difference?
    Thanks!

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @nimas-1

    Please try the following CSS:

    .um.um-login .um-field-label label{
       color:#ffffff !important;
    }
    

    Regards,

    Thread Starter nimas

    (@nimas-1)

    Hi @champsupertramp
    Thank you. Yes, I tried this, but it changes all login form field colors. I have more than 1 login form. That’s why I wanted to target this specific form.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @nimas-1

    Just add the form ID in the selector:

    .um.um-login.um-24795 .um-field-label label{
       color:#ffffff !important;
    }

    Regards,

    Thread Starter nimas

    (@nimas-1)

    Thank you @champsupertramp works perfectly. Funny, less code worked better this time!
    Have a great week! ??

    Thank you also @cryptex_vinci for your time!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to Target the CSS of a Specific Form?’ is closed to new replies.