Hi,

I have an elements:

<div id="mydiv" class="mydivclass">

</div>

In CSS i have like:

div#mydiv {
width: 100px;
}
div.mydivclass {
width: 200px;
}

What i want is to the second CSS (class) setting override the first (id) one. The thing is that the class is added dynamically and i want that element to be styled differently if the class is there, however, it is always styled using the id styling property.

Thanks

Silly me, !important did the job (just posting if anyone else needs to know this).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.