473,436 Members | 1,576 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,436 software developers and data experts.

How to stretch the background image to fill

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 find a "stretch"

Is there one?
Thanks
Nov 2 '08 #1
2 17175
On Sun, 02 Nov 2008 16:05:45 +0100, AAaron123 <aa*******@roadrunner.com>
wrote:
Is that possible. I did find the "repeat" but can not find a "stretch"
CSS does not specify any measures to control the size/strething of
background images. However, you are able to stretch regular images (img
elements), and by playing with the display and z-index attributes you are
able to "fake" a stretched background image.

Example code: http://gist.github.com/21707

--
Joern Schou-Rode
http://malamute.dk/
Nov 2 '08 #2
That works
thanks

"Joern Schou-Rode" <js*@malamute.dkwrote in message
news:op.ujzzxsa431zpn8@marvin...
On Sun, 02 Nov 2008 16:05:45 +0100, AAaron123 <aa*******@roadrunner.com>
wrote:
>Is that possible. I did find the "repeat" but can not find a "stretch"

CSS does not specify any measures to control the size/strething of
background images. However, you are able to stretch regular images (img
elements), and by playing with the display and z-index attributes you are
able to "fake" a stretched background image.

Example code: http://gist.github.com/21707

--
Joern Schou-Rode
http://malamute.dk/

Nov 3 '08 #3

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...
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. ...
1
by: drum118 | last post by:
I took a photo 3600x2400 (8mg) into photoshop and reduce it to 250x188 for a background and to load faster, but it only coming up either as a repeat or a small box. I use this: <style...
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)...
4
by: Bob Altman | last post by:
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...
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.
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.