Welcome, Guest
Username: Password: Remember me
1. The "search..." box above searches the Docs & Forum Posts. The "Search" tab above just searches the Forum Posts. :side:
Please use these to search for your issue *before* creating a new message topic, as your issue may have been previously solved.
2. Please put your Club # and Club Web Address in your Forum Signature (best) OR in each post to get faster support from us.
Click here to edit your signature at the bottom of the Profile Information tab.
3. Our user and admin docs are available at: support.toastmastersclubs.org/doc "There's a doc for that!" ;)
4. There is an "Opt In" Feature for newly added members. The Opt In document explains the strikethrough member information. Click Here to View the Post
5. When posting a New Topic , please include all relevant details and be specific. When did your issue 1st occur? What operating system, browser, & browser version are you using? Did you refresh your browser cache? Are your cookies enabled? Lastly, a screen shot is often helpful.
6. Please abide by the Terms of Use . We are volunteers contributing our spare time. We are happy to assist you, so long as you are respectful and courteous.
7. We are always looking for new FreeToastHost Ambassadors to join our team and support fellow Toastmasters in their use of the FreeToastHost website system. If you are familiar with the system and have some interest, send a Send Us a Private Message.
  • Page:
  • 1

TOPIC:

How to use CSS Sprites to speed up your website... 9 years 7 months ago #38944

  • SteveTheTechie
  • SteveTheTechie's Avatar Topic Author
  • Offline
  • FreeToastHost Developer
  • FreeToastHost Developer
  • Posts: 13529
  • Thank you received: 3831
If you use a lot of photos on your home page, you may notice it takes a bit longer for your website to load, particularly if you do a reload/clear your browser cache.

While you may only care about how fast it loads for you with your photos in your browser cache, consider that a first time visitor to your website is very unlikely to have any of your home page photos in their browser cache, so your website load speed may factor into their impression of your website and of your club/district.

While it is certainly true that the FreeToastHost 2 system design has a very high impact on website responsiveness, the content that you put into your webpages also does, particularly when it comes to photos.

If you have a lot of photos on your pages, then a first time visitor will have to wait while your browser downloads each photo in the process of building and presenting the web page of interest.

There is a way to address this with an advanced technique, if you are up for it. ;) The way is to use CSS Sprites.

CSS Sprites are a way to combine multiple photos/images into one (or a few) files to decrease the number of downloads required, thus speeding up the web page being shown.

You can use the following website to create a CSS Sprite from photos that you want to combine into a sprite: css.spritegen.com/
Make sure that you pay attention to the CSS and HTML code that you are provided in that website along with the actual sprite image.

Once you have saved the sprite image file from that website, you can upload it via the editor just like any other image file.

Now here is the advanced part, actually using the sprite... You will need to work in Source View of the editor for this:

In source view, create a style block at the top and copy/paste the CSS code the above website provided into the style block...:
<style>
  ...  Paste the CSS code in here
</style>

To insert the individual images from the sprite, you can either use the div command from the normal editor view and assign the class to it that corresponds to the image of interest, or you can just copy/paste the HTML that the above website provides into Source view, switch to normal editor view and then delete the images you don't want.

That is all there is to it. This is a bit different approach for putting a photo into a page, since you are referencing the photo via an assigned class name versus the specific filename. The reason for this, of course, is that you already uploaded a file containing a bunch of images combined.
Regards,

Steve James, DTM
FreeToastHost System Developer
Officer Emeritus, Mindful Communicators (Club 1966, District 52) A President's Distinguished Club for each of the last 10 years.

>>> Please put your club number in your forum profile. CLICK here to edit your profile.
The following user(s) said Thank You: atrain101
Last edit: by SteveTheTechie.
The topic has been locked.
  • Page:
  • 1
Moderators: Pamrhtaylor3jliumarc33NotLiabledeedubbleyooNSBPhyllis Kirouac
Time to create page: 0.048 seconds
Powered by Kunena Forum