Since I like photography much of my dabbling in CSS is about showing my photos
in various ways. One thing I've always wanted to do is to get the image width
so I can use it in my declaration but I've never found a CSS-only solution.
For example, assume some HTML code along these lines
<figure>
<img src="2012-12-15_13-01-21_14364.jpg" width="1024" height="681" alt="">
<figcaption>Bla bla bla bla bla</figcaption>
</figure>
Now I would like a parts of my figcaption and figure styled based on the photo
width (not same for all figures/figcaptions)
Is this possible without using javascript or some server-side scripting. So far
I've done this using server-side scripting but I would like to know if there is
a way to do it using CSS only (I haven't found a way in my searches).
- jem
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/