You are here: Re: background-image « HTML « IT news, forums, messages
Re: background-image

Posted by J.O. Aho on 01/12/07 22:05

marvin.avery@sdc-dsc.gc.ca wrote:
> Hi:
>
> I am defining a table cell as follows:
> <table>
> <tr>
> <td style="background-image:url(myimage)">
> </td
> </tr>
> </table>
>
> If the background image is too small, it repeats.

Add the following to the style to make it just appear once:
background-repeat: no-repeat;


> Instead of repeating,
> I would like it to *stretch* to fill the cell. Is there any way of
> doing this? Similarily, if the cell is too small, is there anyway of
> *compressing* the image so I still see the whole thing?

As far as I know, there is no option to fit it to a cell size, but you could
place it in the middle (at least it makes smaller ones to look a bit nice

background-position: center center;

Maybe better for you to adjust your images to one and the same size with some
graphics tool and adjust the cell sizes after the image size, you could also
just place out images with help of div-tags without the need to a table.


--

//Aho

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация