Tip: Tiling images

Friday, August 17, 2007 at 3:53 PM



If you want an image to tile, set it as the background of a div element.

For example, say you want to create a background that looks like kitchen tiles. Here's the code you could use:

<div height="100%" width="100%" x="0" y="0"
background="images\tile.png"/>


Assuming tile.png looks like , here's what the div will look like:



Have a tip you'd like to share? Send it to gd-developer AT google DOT com.

2 comments:

Teo said...

Wow, i had no idea :D

The Reader said...

Wow! This is great!!
Let's tile div s haha :D