curiouswebster
asked on
Razor: What would the CSS look like?
StockLevel has three values,
stockLevelNone, stockLevelLow, stockLevelHigh
used thusly in a Razor file:
<div class="stockLevel stockLevelNone">
<span>Number Of Units In Stock: @Model.UnitsInStock</span>
</div>
Each of the three values would have a different style / color.
How do I code this in CSS?
stockLevelNone, stockLevelLow, stockLevelHigh
used thusly in a Razor file:
<div class="stockLevel stockLevelNone">
<span>Number Of Units In Stock: @Model.UnitsInStock</span>
</div>
Each of the three values would have a different style / color.
How do I code this in CSS?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What is this, then:
<div class="stockLevel stockLevelNone">
<div class="stockLevel stockLevelNone">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
No, I see that one is CSS and the other is the HTML markup. I am just confused what these are:
<div class="stockLevel stockLevelNone">
I thought there would need to be some association between the class named "stockLevel" and the ones named ".stockLevelNone", etc.
I stil do not see it.
<div class="stockLevel stockLevelNone">
I thought there would need to be some association between the class named "stockLevel" and the ones named ".stockLevelNone", etc.
I stil do not see it.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Are they each classes, and by appending them with a space between, adding them both in?
ASKER
Is it like multiple inheritance?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I just never saw stockLevel defined, which is what confused me.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
In your example, test was defined three times and each attribute supplemented the others. Right?
Why are both stockLevel and stockLevelNone used unless they also supplemented the other? Maybe I used the term multiple inheritance incorrectly.
Why are both stockLevel and stockLevelNone used unless they also supplemented the other? Maybe I used the term multiple inheritance incorrectly.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for sticking with me :)
No problem. Happy to help. Keeps me learning.
ASKER
<div class="stockLevel stockLevelNone">