Is there a way to group multiple IDs for hover text styling?

  • Profile Image
    avwhittingham
    Asked on April 29, 2019 at 09:27 AM

    Hi 

    I have a form in which I want to style the hover boxes the same, I've tried the following (see below) but it doesn't seem to work for the .form-description, what's the best way to do this in order to avoid repeating the same code for each instance?

    Thanks

    Tony Whittingham

    #id_339,#id_340,#id_341,#id_342 .form-description{

    left: 600px;

    top: -80px;

    max-width: none !important;

    width: 300px;

    }

  • Profile Image
    avwhittingham
    Answered on April 29, 2019 at 09:35 AM

    Is there a way to group multiple ids for hover text styling is the real question?

  • Profile Image
    Welvin
    Answered on April 29, 2019 at 11:12 AM

    If you want to apply the same style for the entire form hover, you can do it using the class selector. So, that would be:

    .form-description {

    left: 600px;

    top: -80px;

    max-width: none !important;

    width: 300px;

    }

    The IDs are for the indiviual fields only. 




  • Profile Image
    avwhittingham
    Answered on April 29, 2019 at 12:11 PM

    Thanks Welvin, there's a group of 4 that I want to apply the same style to but not all of the hover texts in the form, it's no problem to list the style for each one separately but was hoping that there was a way to only do it once with multiple references at the start

    Thanks for he great service that you all provide

    Tony

  • Profile Image
    david
    Answered on April 29, 2019 at 02:17 PM

    To group specific ID's it would be similar to the following:

    #id_9 div.form-description-content, #id_10 div.form-description-content {
    color : blue;
    }

    So for your example:

    #id_339 div.form-description-content, #id_340 div.form-description-content, #id_341 div.form-description-content, #id_342 div.form-description-content {
    color : blue;
    }