|
Posted by Jeff Bowman on 12/27/06 01:38
"Bergamot" <bergamot@visi.com> wrote in message
news:4v5635F1ak9dqU1@mid.individual.net...
> Jeff Bowman wrote:
>>
>> Maybe I should be asking instead if there's a way to stretch a background
>> image?
>
> No, there isn't - all you can do reliably is repeat on the x and/or y
> axis. Maybe CSS3 has a stretch property (haven't checked), but don't
> hold your breath waiting for that.
Ah, I didn't think so. Thanks for the clarification. CSS3 apparently will
have a background-size property, but as you say I'm sure we'll be blue in
the face before we see it.
> About the best you can do is anchor the image to either the top or
> bottom corner and repeat-x. Set the background color so that it blends
> with wherever the gradient color leaves off.
Yep, turns out that's how I'm going to handle that particular issue, except
I'll to fade into the background color using PNG transparency. How do you
mean 'anchor'? Could you provide a quick sample snippet?
Also, IE (7, at least) seems to have a nasty habit of displaying solid
images of a given color in just a tad different shade than an element's
background color, even if the markup specifies the exact same color as the
image. See below for more on -that- issue.
> BTW, there was an article posted at A List Apart about another way of
> making gradient backgrounds, but I didn't save the URL. Maybe it will be
> useful to you, if you can find it.
I found it, thanks. Considering the gradient fix I just mentioned, I broke
into a cold sweat and was mortified to read about IE6's lack of support for
PNG transparency. (See? I've still got a long way to go in learning about
all of this.)
I then tried the AlphaImageLoader fix suggested, and that works, but
unfortunately it causes IE6 to not respect the image positioning CSS. For
control configurations that specify a background gradient, I can think of no
other solution than to emit table markup (for <= IE6 browsers only).
If you can see a better way through, I'd sure be pleased to hear it.
--
We're losing America. To see how you can help
get her back, visit www.FreedomToFascism.com.
Navigation:
[Reply to this message]
|