Articles

Grid overlay via CSS and a PNG

While working on a site’s CSS, I’ve been using transparent PNGs to overlay a grid image on the page in order to align design elements to the grid. Previously, I specified a repeating background grid image on the body tag, and commented it out when I didn’t want to see the grid. That works fine, but any child elements that use background images or colors will sit on top of the grid, obscuring it. And the repeating grid image will take the place of any background image which is supposed to be part of the design.