css (and sunflowers and a drag queen or two)
My life has been taken over by the following in the past couple of days: HTML. Long commutes. Discussions about Layered semantic markup versus the TABLEs. Javascript pre-loading. Cascading style sheets. Non-web standard methods for Internet Explorer for the sheer sake of it “looking cool.” And most of all, sunflower fields. Endless sunflower fields. Don’t get me wrong, I’m loving the job, but If I dream about a sunflower field one more time, god help me, I’m going to scratch my goddamn eyes out and then I’ll have to use layered semantic markup to make this text-to-speech reader work.
(For those baffled about the reference to sunflowers, it will all make sense in a couple of weeks. Trust me.)
In the mean time, maybe one of you CSS gurus can help me out, yeah?
Let’s say I am currently working on a page that uses a table layout to
make a simple drop shadow. But why use tables when you can compact
the code into CSS?
My thought exactly.
But now I’m running into a little issue - I want to use the same
classes for any image I want to apply a shadow to, and I don’t know
the dimensions of that image all the time. How do I do this (that
will work for both IE and Moz)?
This page should illustrate my situation nicely.
As you can see, if I set my shadow/container DIV to be an inline
element, it won’t work in Mozilla. If I set it as a block, the
width automatically becomes width:100% - that doesn’t work. I had
some minimum success floating the element left - it seemed to pick
the width up that way - but I can’t have the element floating left
since I’m using this inside tables.
Any help would be appreciated.
Update: Thanks, Leon!
8 Comments