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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -