I have an H1 tag and inside that, there is anchor tag which is generating from the code
<div class=".slide-title">
<H1>
@RenderLinkTracking(m => m.btn, Model.bTnTitle)
</H1>
</div>
The RenderLinkTracking creates anchor tag
<a href="/home/" data-id="Image Title<">Image Title</a>
CSS of the anchor tag is
.slide-title a
{
color : red;
}
I am trying to override the CSS of the anchor tag. This is how I am doing and working fine
<style>
@if (Model.Param.H1CSS!= null)
{
<text>
.slide-title a
{
@Html.RenderCSSAndJSAttributes(Model.Param.H1CSS).ToString().Replace("style=","")
}
</text>
}
</style>
The method Html.RenderCSSAndJSAttributes is generating a style color:#001595 !important;font-family:Book Antiqua !important;Text-align:10px;Text-align:Center
Is there any better way to override the class CSS or append the inline CSS using jquery? Any suggestion would be appreciated.
Thanks in advance
"slide-title"not".slide-title". No periods in the class names.