Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Change the CSS of a multiple div class

I’m trying to define a style for:

<div class="simplequiz result" style="float: left; margin: 0 30px 30px 0; text-align: center; max-width: 80px;"><span class="simplequiz result_quiz_name" style="font-size: smaller;">Análise</span><br><br><span class="simplequiz result_total" 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!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

>Solution :

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;
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading