Use the HTML class property in CSS file -
i have html div tag belows:
<div id="cookiemsgbox" class="blue" style="display: block;"> this consists of few links , span tags. of them appear in blue color because of class=blue; property.
now instead of putting in html tag wish use class property in css. have written belows:
#cookiemsgbox { class: blue; } also tried :
#cookiemsgbox { class: #364395; } but not works. links , span elemnets appear gray(colorless).
where going wrong ? please help. :)
in css use color: blue;. understand css selectors refer https://developer.mozilla.org/en-us/docs/web/guide/css/getting_started/selectors
#cookiemsgbox { color: blue; } explaination:
#selectsidattribute.selectsclassattribute.
#cookiemsgbox selects element id="cookiemsgbox".
.blue selects elements class="blue"
Comments
Post a Comment