Jump to content

Why is a tiled background better?


Guest sdcman1

Recommended Posts

Guest sdcman1

I didn't know whether to put this in the Beginners section or what, but here is my question.

 

Why is it better to use a small image and tile it?

 

I know it's to make the file small and reduce bandwidth and stuff, but does using a tiled image increase file size or load time. I mean, say you have a small navigation bar, and decide to have a striped background. Instead of using a (for arguments sake) 20kb image, you can use a small 5kb image and have that repeat itself. If you repeat it 5 times horizontally, will that equate to a 25kb image?

 

Would the load time vary if it's a small image repeating over a large background? And how small can you go. Can you use a really small (say 1x1px) image and tile it over an area like 200x500px or bigger?

Link to comment
Share on other sites

If you repeat it 5 times horizontally, will that equate to a 25kb image?

No, only a single 5kb image would be transferred across the Interweb. And usually only once, because your Browser will cache the image if the page is using an external CSS style sheet.

Would the load time vary if it's a small image repeating over a large background?

An image of several hungred KB can be quite slow for dial-upusers.

And how small can you go. Can you use a really small (say 1x1px) image and tile it over an area like 200x500px or bigger?

Yes, a 1 x 1 px size image will cover the entire body element by repeating itself.

Link to comment
Share on other sites

Here is the trick to it.

 

Make the image 1x2 pixels vertical (or horizontal for vertical stripes). Blow it up really large, color one side the way you want, place a box over the other side with the other color and compress to one image. Now you place it as the background and this all bot no existent image (weighing almost nothing) tiles giving you 1 pixel stripes.

 

If you want larger stripes use 2 x 2 etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...