html5 - css styles work in id, but not in class -
i trying apply styles div. div unique in width, padding , other attributes, there many other divs in site same border-radius , opacity styles, (but different widths paddings etc) want use class. find if list attributes under div id, works perfectly, if list under #selector , others under .selector, class selector styles not applied. know why. can't done or error in code?
thank you!!
here code doesn't work:
html:
<section id="container"> <div id="gallery" class="outline">this problem div</div> </section>
css:
div#gallery { display:inline-block; margin:0 auto; max-width:100%; text-align:center; width:100%; } .outline { background: #212121; -moz-border-radius:0.5em; -webkit-border-radius:0.5em; border-radius:0.5em; opacity:0.75; filter:alpha(opacity=7.5); }
Comments
Post a Comment