1. Computing & Technology

Discuss in my forum

Can You Fix a Background Image to the Bottom of a Table?

By , About.com Guide

Question: Can You Fix a Background Image to the Bottom of a Table?
I received the following question from Chris:
Is it possible in a table to have the background of it be fixed at the bottom of it? If so, how?
Answer:

Fixing a background image to the bottom of a table works the same way you would fix a background image to the bottom of any other block-level element. You use the background-image, background-repeat, and background-position CSS properties.

First you attach the image to your table:

<table style="background-image: url(image.gif);">

Then you tell the browser not to repeat the image:

<table style="background-image: url(image.gif); background-repeat: no-repeat;">

And finally, you position that image at the bottom of the table:

<table style="background-image: url(image.gif); background-repeat: no-repeat; background-position: bottom;">

See an example table with a background image at the bottom.

©2012 About.com. All rights reserved.

A part of The New York Times Company.