14, February 2012

Repeating background using CSS Sprites? - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Design and Layout  >  Web Page Design  >  CSS (Moderator: Meth0d)
Topic: Repeating background using CSS Sprites?
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author Topic: Repeating background using CSS Sprites?  (Read 3248 times)
What a dork
*
Gender: Male
Posts: 17
130 credits
Members referred : 0


« on: Feb 29, 2008, 01:16:38 pm »

I've only recently discovered the wonders of using CSS Sprites to increase page download speed by making fewer HTTP requests.

Read about it here:
http://www.fiftyfoureleven.com/weblog/web-development/css/css-sprites-images-optimization

It is a great technique that makes a very noticable improvement in speed.

My question is: Does anyone know of a way of using this technique with background images you need to repeat. I've tried everything I can think of and can't get it to happen.

I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 5779
46271 credits
Members referred : 3



« Reply #1 on: Feb 29, 2008, 02:09:42 pm »

I don't think it is possible. But anyway an extra request for the background is not that bad, right? Smiley

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
What a dork
*
Gender: Male
Posts: 17
130 credits
Members referred : 0


« Reply #2 on: Feb 29, 2008, 02:23:26 pm »

Well one bg image wouldn't matter so much, but if you're using a few different bg images it really starts to add up.

It seems like there should be a way - but can't for the life of me get it to work Sad
What's HTML?
****
Gender: Male
Posts: 408
2466 credits
Members referred : 2



« Reply #3 on: Mar 02, 2008, 01:06:05 am »

what do you mean have one actual .jpg for lets say 3-4 background images ?
well I don't think there is a way to hide parts of an image other then
the containing element's width and height, thus I agree with Nikolas
don't think its possible


Last blog : Offline Promotion Of Your Website
What a dork
*
Gender: Male
Posts: 17
130 credits
Members referred : 0


« Reply #4 on: Mar 02, 2008, 07:14:44 pm »

The idea is to combine all of the images you use on the majority of your pages into one image file - usually a .gif - and then define various positions of that image with css to display the different images.

Here is another example - this time showing how Yahoo and AOL use this technique on their portals.
http://www.websiteoptimization.com/speed/tweak/css-sprites/
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7620
Tags : css sprites Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Design and Layout  >  Web Page Design  >  CSS (Moderator: Meth0d)
Topic: Repeating background using CSS Sprites?
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Feb 14, 2012, 05:37:57 am





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.