473,385 Members | 1,890 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,385 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 17166
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.
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.