Tile Background Image in a Cell

K

Karl Burrows

Is it possible to tile a background image so it repeats in a cell? I want
to create a border on the right side that may vary in height based on the
size of the page and would like to be able to just use one background image
that can repeat as the pages extend. is this possible?

Thanks!
 
M

Murray

All background images tile by default, so yes. However, I suspect your
question is "can I tile a background image only vertically,and position it
on the right?" and that answer is also yes -

table.special td.this { background-image:url(/images/border.gif);
background-repeat:repeat-y;background-position:right; }

will style a background image (/images/border.gif) to tile only in the
vertical dimension, on the right of the cell, in a selected table's cell,
e.g.,

<table class="special"...>
<tr>
<td>...</td>
<td class="thisone">your background image will tile here</td>
</tr>
</table>
 
K

Karl Burrows

Thank you!!

All background images tile by default, so yes. However, I suspect your
question is "can I tile a background image only vertically,and position it
on the right?" and that answer is also yes -

table.special td.this { background-image:url(/images/border.gif);
background-repeat:repeat-y;background-position:right; }

will style a background image (/images/border.gif) to tile only in the
vertical dimension, on the right of the cell, in a selected table's cell,
e.g.,

<table class="special"...>
<tr>
<td>...</td>
<td class="thisone">your background image will tile here</td>
</tr>
</table>
 
M

Murray

You're welcome - a slight correction, though. I use "td.this" in my styles,
and <td class="thisone"> in my HTML. Those need to be consistent, e.g., <td
class="this">.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top