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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -