Home > OS >  Change the CSS of a multiple div class
Change the CSS of a multiple div class

Time:08-13

I'm trying to define a style for:

<div  style="float: left; margin: 0 30px 30px 0; text-align: center; max-width: 80px;"><span  style="font-size: smaller;">Análise</span><br><br><span  style="font-size: large;">1/2 (50%)</span></div>

So, after a lot of searching in stack overflow, I got this CSS:

.simplequiz.result{
    float:none;
    max-width:500px !important;
    text-align:left;
}

But the style is totally unchanged!

My CSS skills are just too basic, can anyone help?

CodePudding user response:

Inline styles have priority over external CSS rules, that's why nothing changes. What you can do is to add !important to all your settings, although this is something that's only recommended in situtations where nothing else is possible.

.simplequiz.result{
    float:none !important;
    max-width:500px !important;
    text-align:left !important;
}
  • Related