Friday, May 16, 2008

adding a background grid

Ever wondered how to get a grid background like in some designer tools? Here is a simple way.

Decide on the cell size you want. You may choose 20*30 pixel. Create a image of that size in paint. Draw a line in the last row and last column. You should get a image like this :




Include this image as a background in your canvas. Allow the image to be repeated horizontaly and vertically.

In case of html+css, you may specify as :

.grid
{
background-image:url(../images/bluegrid.JPG) !important;
background-repeat: repeat;
opacity:0.1;
filter:alpha(opacity=10);
}



This should give out the desired result :


No comments: