welcome to the fest
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

html helpline

 
Post new topic   Reply to topic    Sinfest Forum Index -> Casual Chat
View previous topic :: View next topic  
Author Message
Drui



Joined: 11 Jul 2006
Posts: 541
Location: 'Jersey :}

PostPosted: Tue Aug 22, 2006 3:51 am    Post subject: html helpline Reply with quote

Every time I start a thread I am afraid I'm gonna get flamed... but I need html help, and many of you are handy in that manner, and I don't wanna go digging to see if anyone has already posted this.

How can I set the background image of a page to resize so that the whole image fits regardless of the viewer's resolution?

If anyone else has html questions, please feel free to post them here.
_________________
fight
Back to top
View user's profile Send private message
smeat



Joined: 09 Jul 2006
Posts: 542
Location: Shmocation

PostPosted: Tue Aug 22, 2006 4:04 am    Post subject: Reply with quote

As far as I remember this is not possible. If you check out the "Question: What's the highest resolution you've seen?" topic you will see another discusion about this. There are also some good ideas there as well.
_________________
Allowed to live by the good graces of Deleted, Shh.

"We've been attacked by the intelligent, educated segment of the culture."  - Ray Mummert, creationist, Dover Pennsylvania, 2005
Back to top
View user's profile Send private message Visit poster's website AIM Address
Dro



Joined: 10 Jul 2006
Posts: 3861

PostPosted: Tue Aug 22, 2006 5:00 am    Post subject: Reply with quote

You could call a Perl script that takes the window size as an input and then calls GD to resize a graphic on the fly and save it to disk for use as the background.

I'm surprised I can't think of a web site that actually does that, even though it would be horribly inefficient and slow and kludgy.
Back to top
View user's profile Send private message
kame



Joined: 11 Jul 2006
Posts: 2565
Location: Alba Nuadh

PostPosted: Tue Aug 22, 2006 2:11 pm    Post subject: Reply with quote

You could use javascript to determine the window size, and then have php (or any other scripting language) select the background from a series of differentiated resolutions of the same picture.

But really, one giant background? That's bad form Razz
_________________
bi-chromaticism is the extraordinary belief that there exists only two options
each polar opposite to each other
where one is completely superior to the other.
Back to top
View user's profile Send private message MSN Messenger
strangemusic



Joined: 09 Jul 2006
Posts: 305
Location: Vancouver, BC and Kingston, ONT

PostPosted: Tue Aug 22, 2006 2:17 pm    Post subject: Reply with quote

q: won't this MANGLIFY the quality of the image if it's less-than-astronomical resolution?
Back to top
View user's profile Send private message
Drui



Joined: 11 Jul 2006
Posts: 541
Location: 'Jersey :}

PostPosted: Tue Aug 22, 2006 2:18 pm    Post subject: Reply with quote

kame - Yeah, I know. I'm trying to figure out what to resize the image to in order to be efficient, but I don't want users with minute resolutions to see some kind of ugly border on the background image.
_________________
fight
Back to top
View user's profile Send private message
kame



Joined: 11 Jul 2006
Posts: 2565
Location: Alba Nuadh

PostPosted: Tue Aug 22, 2006 2:24 pm    Post subject: Reply with quote

strangemusic wrote:
q: won't this MANGLIFY the quality of the image if it's less-than-astronomical resolution?


a: gd isn't the best at resampling images, but it does the job.

drui, what does this background look like, can you post a pic?
_________________
bi-chromaticism is the extraordinary belief that there exists only two options
each polar opposite to each other
where one is completely superior to the other.
Back to top
View user's profile Send private message MSN Messenger
Drui



Joined: 11 Jul 2006
Posts: 541
Location: 'Jersey :}

PostPosted: Tue Aug 22, 2006 2:45 pm    Post subject: Reply with quote

Of course, anything for you kame. Razz

Original image is 1710x1362. Way too big, but what to do?

I intend to play with the opacity too.
_________________
fight
Back to top
View user's profile Send private message
kame



Joined: 11 Jul 2006
Posts: 2565
Location: Alba Nuadh

PostPosted: Tue Aug 22, 2006 3:09 pm    Post subject: Reply with quote

That image is too pretty to have text, and tables, and other stuff crawling all over it. Please, in the name of all that is good design practice, don't use that image. Smile
_________________
bi-chromaticism is the extraordinary belief that there exists only two options
each polar opposite to each other
where one is completely superior to the other.
Back to top
View user's profile Send private message MSN Messenger
mantismag



Joined: 09 Jul 2006
Posts: 81

PostPosted: Tue Aug 22, 2006 4:23 pm    Post subject: Reply with quote

the answer to your question is that this is not possible in html+css. the only way to do this is with scripting. dro mentioned perl and gd. there's also php and imagemagick. i wouldn't do it though.

unfortunately the picture would not make a very good background image unless you manage to position it exactly. the fact that it ranges from bright to dark will make finding a good contrasting color for your text troublesome. the main point of interest is the ground and the sunset. as such it would make an excellent header or footer image if you crop out just that bottom quarter of the image. and if you used an <img> as your header or footer you could resize it and center it. it would also eliminate the need to mute the colors in order to make your text readable.
Back to top
View user's profile Send private message
Michael



Joined: 09 Jul 2006
Posts: 10698

PostPosted: Tue Aug 22, 2006 11:43 pm    Post subject: Reply with quote

or you could slap on a big semi-transparent white box with a light stroke around it, some sort of shadow etc. it'd still be huge though Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Sinfest Forum Index -> Casual Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group