Grow your CSS skills. Land your dream job.

CSS sprites px size limit?

  • # March 2, 2010 at 10:43 am

    Hi,

    My web designer/programmer is out of town and I would need to get an answer to my question.
    We are creating a WordPress theme with LOTS of different backgrounds.
    I thought it would be a good idea to use CSS sprites.

    The image sizes are for example:
    15000 x 500px
    150 kb
    PNG

    and

    980 x 8000 px
    130 kb
    PNG

    The plan is that these images will cover almost all static backgrounds on the site, to achieve speed. And since the image size doesn’t exceeds 150 kb I figure that the pixel size won’t matter. Am I right? Or does pixel size matter? Are there any limits on pixel size for backgrounds?

    Would it make any difference at all if the image was:
    5 000 x 500px
    150 kb
    PNG

    Web browser problem? Hosting problem?

    Best regards,

    Hakan

    # March 2, 2010 at 5:56 pm

    Pixel size doesn’t matter.

    But you should keep a very close eye on file size.

    # March 2, 2010 at 11:35 pm

    Thanks for helping me out!

    The huge css file is done. But the web browser seems to have problem handling the big pixel sizes in some strange way, EVEN IF THE PAGE IS FULLY LOADED.

    When I change window tab in Firefox it takes a few seconds for the tab to respond (not always but sometimes). Explorer seems to handle it better (this problem doesn’t appear on other tabs/websites).

    Are you shore that web browsers can handle the big pixel size in background images?

    Will it matter if the big pixel size image is set to “repeat-x” or “no-repeat” in the background image?

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".