Computing.Net > Forums > Web Development > Auto Resize Image

Auto Resize Image

Reply to Message Icon

Original Message
Name: tau_titan
Date: July 25, 2005 at 02:30:30 Pacific
Subject: Auto Resize Image
OS: Win XP
CPU/Ram: Athlon 2700+ / 512 PC2700
Comment:

I have a website and would like to have an image behind my nav bar. Nothing special just a diagonal gradient or something along those lines. I was wondering if there was any way in which i could stretch the image depending on the size of the page without having to have separate pixel perfect images for each one.

Many Thanks,

Matt

www.bbcomputing.co.uk

matt@bbcomputing.co.uk


Report Offensive Message For Removal


Response Number 1
Name: Michael J (by mjdamato)
Date: July 25, 2005 at 06:28:13 Pacific
Subject: Auto Resize Image
Reply: (edit)

The easiest way I can think of is to include your nav bar inside a table cell. Then, include the gradient image as an element within the cell and give it a width of 100%. You would need to use the z-index property in order to show elements on top of the image.

Michael J


Report Offensive Follow Up For Removal

Response Number 2
Name: tau_titan
Date: July 25, 2005 at 06:33:32 Pacific
Subject: Auto Resize Image
Reply: (edit)

Cheers m8 any tutorials on this as although i have a website i am not too sure about how to use things as "elements."

Matt

www.bbcomputing.co.uk

matt@bbcomputing.co.uk


Report Offensive Follow Up For Removal

Response Number 3
Name: Michael J (by mjdamato)
Date: July 25, 2005 at 09:18:48 Pacific
Subject: Auto Resize Image
Reply: (edit)

By "element" I mean a piece of content within the cell as opposed to setting the image as the background of the cell (e.g. using the IMG tag). You can do a Google search of "CSS z-index" on how to use that feature.

Michael J


Report Offensive Follow Up For Removal

Response Number 4
Name: tau_titan
Date: July 25, 2005 at 11:05:58 Pacific
Subject: Auto Resize Image
Reply: (edit)

Thanks again m8.

Matt

www.bbcomputing.co.uk

matt@bbcomputing.co.uk


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Auto Resize Image

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




How often do you use Computing.Net?

Every Day
Once a Week
Once a Month
This Is My First Time!


View Results

Poll Finishes In 3 Days.
Discuss in The Lounge