html - DIV has multiple classes assigned, but I want to apply a style to only one of those classes, is it possible? -


here envision doing:

<div class="a1 a2" style="width:15%"> text </div> 

now .a2 colorized bar overlay text, variable width (which why need declare width in html). in example, need a2 15% width. still need .a1 remain 100% width (which declared in css).

is @ possible or going wrong way

you should create 2 different div containers:

<div class="a1">     <div class="a2">          content     </div> </div> 

then apply style each respective class.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -