If you're going to use a .gif or .jpg as a background in a <td> cell is there a way to keep it from repeating? I've not much fortune with it at this point.
Thanks,
BuddyB

Recommended Answers

All 4 Replies

Use CSS background property, set to either no-repeat, repeat-x, or repeat-y.

the full code for that is:
<td style="background: #ffffff url(graphics.png) left no-repeat;"></td>
If you visit the property table on the w3 website they have a list: http://www.w3.org/TR/CSS21/propidx.html click the individual items on the second column of the background property for samples and a full explanation.

You can omit whatever you want from those values (e.g. the color).

the full code for that is:
<td style="background: #ffffff url(graphics.png) left no-repeat;"></td>
If you visit the property table on the w3 website they have a list: http://www.w3.org/TR/CSS21/propidx.html click the individual items on the second column of the background property for samples and a full explanation.

You can omit whatever you want from those values (e.g. the color).

That works beautifully! Thanks! I'm placing some nav buttons on top of that background image, and because I've used a drop shadow on it they're off center (but not really..just look it). Within the framework of that data cell is there some way to to position the x factor more precisely so that it looks centered in the main part of the background image?
BuddyB

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.