Give style attributes to sub-elements inside a <style> tag?

Posted by Giffyguy on Stack Overflow See other posts from Stack Overflow or by Giffyguy
Published on 2010-04-09T20:36:40Z Indexed on 2010/04/09 20:43 UTC
Read the original article Hit count: 412

Filed under:
|
|
|
|

My <style> for thumbnails currently looks like this:

<style type="text/css">
    img.TN {
        width: 100%;
        margin-bottom: 5.294%;
        cursor: pointer; }
</style>

This is annoying, because I have to apply this style to every single thumbnail image individually, when there could be any number of them on the screen at any given time. All of the thumbnails are inside a single <div> that groups them together, and I'd like to apply a single style to the <div> that will push the attributes I need down to all of the the <img> elements nested inside, regardless how many thumbnails there are.

I'm using ASP.NET 2.0, and CSS 2.0

Does anyone know how to do this? Thanks!

© Stack Overflow or respective owner

Related posts about css

Related posts about ASP.NET