9, July 2008

Repeating background using CSS Sprites? - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ 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

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


« on: Feb 29, 2008, 02: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 Visit through proxy

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: 7946
40629 credits
Members referred : 3



« Reply #1 on: Feb 29, 2008, 03: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 Visit through proxy

Last blog : MIA - Where Nick and Tim
What a dork
*
Gender: Male
Posts: 17
130 credits
Members referred : 0


« Reply #2 on: Feb 29, 2008, 03: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
So if I press Alt F4... What?
****
Gender: Male
Posts: 389
2352 credits
Members referred : 2



« Reply #3 on: Mar 02, 2008, 02: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 : Pagerank 0, the new Leprosy ?
What a dork
*
Gender: Male
Posts: 17
130 credits
Members referred : 0


« Reply #4 on: Mar 02, 2008, 08: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/ Visit through proxy
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....

Topic sponsors:
Get a permanent link here for $1.99!


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?
Jul 09, 2008, 03:49:20 PM





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!


Forum Statistics
Total Posts: 35.594
Total Topics: 7.356
Total Members: 3.662
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: seo_mike

21 Guests, 3 Users online :

18 users online today:



Readers

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