473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to stretch a background image?

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

Aug 25 '08 #1
4 5724
Have you heard of CSS? There's an x-repeat attribute that can be used

"Bob Altman" <rd*@nospam.nospamwrote in message
news:Oc****************@TK2MSFTNGP05.phx.gbl...
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
Aug 25 '08 #2
"Bob Altman" <rd*@nospam.nospamwrote in message
news:Oc****************@TK2MSFTNGP05.phx.gbl...
>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

"HillBilly" <so******@somewhere.comwrote in message
news:um**************@TK2MSFTNGP06.phx.gbl...
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.
Aug 25 '08 #3
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 (ji****@online.microsoft.com, 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:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#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/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Aug 26 '08 #4
Thanks Jialiang.
Aug 26 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: TAM | last post by:
Hi, I am using a table with height and width as 100%. I wish to use a background image of size W 62x H 314 pixels for one table cell. How do I make the background image stretch to fit the...
1
by: Soobrassen Thoplan | last post by:
Hi to all I would like to know how i can dynamically stretch the background image which is on an mdi form in vb .Net .. -- Regards Soobrassen Thoplan
3
by: Greg Heilers | last post by:
Hello everyone... If one has a <div> that is completely filled with a background-image; how does one style it so that the image *continues* to fill the <div> top-to-bottom, left-to-right; if...
3
by: Sridhar | last post by:
Hi, I have created a user control which has the html code as follows <TABLE id="ToolBarTable" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td align="right"...
2
by: Water Cooler v2 | last post by:
I want to stretch the image so that it fills the entire cell width and height. How do I do that? <TD background="bg.gif" width="100%" height="100%" style="background-repeat: no-repeat;"> So...
6
by: ChrisAtWokingham | last post by:
I am creating a website using .Net v2.0 and c# and I have a problem with background images. I want to dynamically change the background image on the page, depending on data in the SQL database. ...
5
by: =?Utf-8?B?S3VsYmVy?= | last post by:
I feel my delay. I had work. First of all, thank you for reply. I explain: I do not know use the code of the original web page in VB.NET. Gillard made the translation from C (and thank you)...
2
by: AAaron123 | last post by:
I have a pretty simple background image. Just a gradient using two colors. I like to uses a small image and have the browser stretch it. Is that possible. I did find the "repeat" but can not...
1
by: ravideep | last post by:
I want to stretch the background image of <td> according to the width of td. The width of td can vary becouse of the content inside the td tag. so the background image should be stretched accordingly.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.