Web Wiz - Green Windows Web Hosting - Celebrating 25 Years!

  New Posts New Posts RSS Feed - Background
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Background

 Post Reply Post Reply Page  <12
Author
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 01 July 2005 at 11:26am
I'll have to test a solution. I'll get you some code this weekend.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
Paramount X View Drop Down
Groupie
Groupie


Joined: 11 January 2004
Status: Offline
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paramount X Quote  Post ReplyReply Direct Link To This Post Posted: 01 July 2005 at 12:06pm
Ok. Thank you. I did'nt realize it was  a big thing in ASP to resize  a image. Show how much I know.  I though it would be like HTml like width=100% and you know.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 01 July 2005 at 8:44pm
Actually, its not a big thing in asp. It's a big thing in html. Html can automatically resize an image - just not a background image. It will attempt to tile a background image if the container is larger than the image.

One way around this is to use a background image that is larger than any likely screen size you may encounter. For backgrounds that may need to expand in width, this usually means an image that is 2048 pixels wide. The downside of this is the background image wont shrink to scale. If the html container is less than the width of the background image, the image gets trimmed - not shrunk.

In order to have a background image that scales as it's container changes size, you need to use css.

So the work comes down to...
  1. Figure out some css that can scale a background image in an html container and create a new css class name for it.
  2. Test the css. First with a background for a <td> (table cell). If that doesn't work, test some html using a <div> within the <td> with the new css class being assigned to the div.
  3. Change the asp code to write different html specifying the new css class but only for those table cells you want.

Using asp to write different html is the easy part. Using css to overcome the flaws in html handling of background images, and then testing new html necessary to make it work, is the hard part.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
Paramount X View Drop Down
Groupie
Groupie


Joined: 11 January 2004
Status: Offline
Points: 97
Post Options Post Options   Thanks (0) Thanks(0)   Quote Paramount X Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2005 at 12:52pm
ok erm. again i am not the expertise in asp
 
Const strBgImage = "img class="img.bgImage" src="http://www.web-zone.org/sfondi/images/XboxWall.JPG" />
   
 
 
img.bgImage {/* scalable em size class 10000 x 1000 graphics */
  width: 1000em;
  height: 1000em;
  }
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.