How to stretch a background image?

B

Bob Altman

Hi all,

I posted an earlier question to the microsoft.public.inetserver.asp.general
newsgroup asking how to set the background of a client-side table cell to a
gradient, and I received this answer:
If you know what the start and end colors are in advance, we can
pre-design an image with the expected gradient color range, then load
and stretch the static image to the table cell.

How do I stretch the static image? The Style property builder for a table
cell lets me specify the background image location, tiling, scrolling, and
position. But I can't find any obvious way to tell it to stretch the image
to fill the cell.

TIA - Bob
 
B

Bob Altman

HillBilly said:
Have you heard of CSS?

Heard of it? Yes. Have any experience applying it in the real world? No.
There's an x-repeat attribute that can be used

I did a quick Google search for "CSS x-repeat" and found a couple of
articles that explain that it allows the image to be repeated vertically or
horizontally. That sounds to me like the same effect as "tiling", which I
can do directly in the Style property builder, but that's not the effect I
want. I want the image to dynamically resize to fill its container.
 
J

Jialiang Ge [MSFT]

Hello Bob,

You may want to have a lot at this article:

http://webdesign.about.com/od/css3/f/blfaqbgsize.htm

It demonstrates how to stretch a background image. See the section "Faking
a Stretched Background Image Over a Smaller Space". It also provides demos
at the link "see an example". There is no built-in css style to stretch an
image background.

If you have any other questions or concerns, please DON'T hesitate to tell
me.

Regards,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top