Reputation: 884
I am trying to attach CSS to the div below. It is created in a partial view and is nested within 8 other divs. I am trying to apply a simple .readMore {overflow:hidden;} rather than drilling down since the .readMore class is used on several other pages. It is not applying however. Is this not the correct implementation. Thanks for any help!
HTML:
@if (renderDetails){
<div id="details" class="readMore">
@Html.Raw(Model.FullDescription)
@*@Html.Action("ProductSpecifications", "Catalog", new { productId = Model.Id })*@
</div>
}
Upvotes: 0
Views: 112
Reputation: 3788
You're absolutely correct in what you doing. As @enguerranws pointed out web developer is a right place to go. Go there and see if your class is being picked up. If yes then investigate if it's not being overriden by anything else, you'll see it crossed out. Also check if haven't got some typo, css class names are case sensitive, test if inlining your rules does take an effect.
Good luck with that.
Upvotes: 1
Reputation: 81
In head tag you have to add:
<link rel="stylesheet" href="css/your css name.css" type="text/css" >
then you can call any class and id of css
Upvotes: 0