Computing.Net > Forums > Web Development > BG Stretch on any Resolution w/text

BG Stretch on any Resolution w/text

Reply to Message Icon

Original Message
Name: Tweaked700
Date: August 11, 2004 at 23:25:07 Pacific
Subject: BG Stretch on any Resolution w/text
OS: Windows 98
CPU/Ram: 1Ghz/256
Comment:

http://vanguardseven.free2host.net/ is where the site demo is and I'm having a winger of a time. I need to have the upper BG image of New York to stretch, not repeat, all the way across like it is here http://vanguardseven.free2host.net/top3.htm

Problem is, if you look closely, the top3.htm has the text in it's own little image. I need the text as seen in the demo web site, at the top of the top frame BG. But I also need that BG image to stretch across the screen reguardless if someone's resolution is 800X600 or 1024x768. This is a winger...can anyone help?


Report Offensive Message For Removal


Response Number 1
Name: Jamie_McCoy
Date: August 12, 2004 at 05:09:17 Pacific
Subject: BG Stretch on any Resolution w/text
Reply: (edit)

width=100%

put that in the image tag

Jaymc.co.nr


Report Offensive Follow Up For Removal

Response Number 2
Name: Laler
Date: August 12, 2004 at 14:26:20 Pacific
Subject: BG Stretch on any Resolution w/text
Reply: (edit)

put content in the upper layer

here:
http://azza.al-azhar.web.id/index2.htm
http://azza.al-azhar.web.id/indextest.php

it's a bit uncommon but layering and image size in % is html 4.0 compliant

^o^
are you in Asia? do you watch Animax Asia? Please Vote


Report Offensive Follow Up For Removal

Response Number 3
Name: Tweaked700
Date: August 12, 2004 at 19:26:19 Pacific
Subject: BG Stretch on any Resolution w/text
Reply: (edit)

The width=100% only applys to something in the tag, not a background correct? I put the width=100%
there and no results. I don't want the image to repeat, just to stretch. The tag is there but I need to stretch across, not repeat


Report Offensive Follow Up For Removal

Response Number 4
Name: Laler
Date: August 12, 2004 at 20:15:58 Pacific
Subject: BG Stretch on any Resolution w/text
Reply: (edit)

you're right, can't put sizes on background image or css, that's why I said above you need to put the content in the upper layer... the image is in the bottom layer (not background)...

see the sample pages and get the css file...

or here's the basic:

[body with 0 margin & 0 padding]
[image stretched]
[upper layer, absolute position top-left, width-height 100%]

[!-- content here --]

[/upper layer]
[/body]

:)


^o^
are you in Asia? do you watch Animax Asia? Please Vote


Report Offensive Follow Up For Removal

Response Number 5
Name: Laler
Date: August 12, 2004 at 20:31:27 Pacific
Subject: BG Stretch on any Resolution w/text
Reply: (edit)

imo, stretching the image, although it's w3c compliant is not really good... no matter how, it'll be crippled... that's why at the sample I only put those blurred image, so if it is crippled then it wont be a big problem anyway :D

here's another trick:

create the image for a wide resolution, but make it still nice at the first 728 pixel if it is viewed with 800x600 resolution...

then put the image as a bgimage in a table, and align it to left...

that way, 800x600 user will only see what they can see, but no horizontal scrollbar will show...

and wider monitor users will still see nice-uncrippled image...

here's a sample:

http://azza.al-azhar.web.id/sulteng/

look at the top image, and try to resize your browser :)

in that site, there's a script to detect if you're accessing it by using resolution wider than 1024 then the main table'll be fixed at 1024 and centered...

but if you access it by using 1024 or lower, it'll be stretched...

so if you want to test it out, you must use 1024x768 resolution... and slowly resizing your browser...

I hope Im not creating more confusion here :o

^o^
are you in Asia? do you watch Animax Asia? Please Vote


Report Offensive Follow Up For Removal


Response Number 6
Name: Tweaked700
Date: August 13, 2004 at 20:42:53 Pacific
Subject: BG Stretch on any Resolution w/text
Reply: (edit)

But I need the text to be in it too. The text is seperate from the image.


Report Offensive Follow Up For Removal

Response Number 7
Name: Laler
Date: August 13, 2004 at 21:30:09 Pacific
Subject: BG Stretch on any Resolution w/text
Reply: (edit)

yes that can apply in both method :)

1st method:

use stretched image in the bottom layer

- because we can't put image sizes on css/background

- image will be crippled

- sample here <-- view the source and get the css file (look at "link href")

2nd method

use wide image as a table background, but make the first 800 pixels still meaningful when the site is viewed by 800x600 users...

- image quality won't change

- we can put javascript & php to load only the necessary images (eg: don't load the rest of the image when only the first 800 pixel will be visible)

- another sample here <-- same as my above post, you can only test it out if you use exactly 1024x768 resolution before your browser session is recorded by the server (before opening the site)

^o^
are you in Asia? do you watch Animax Asia? Please Vote


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: BG Stretch on any Resolution w/text

Comments:

 


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