You are here: Re: question about textflow « HTML « IT news, forums, messages
Re: question about textflow

Posted by Ben C on 10/27/06 09:24

On 2006-10-27, Knut Krueger <Etron777@web.de> wrote:
> Hi to all
> I would like to get the text exactly as wide as the image.
> http://pizza.einthal.de
>
> any hints for me?

You can set its container to the same width that the image happens to
be.

Or use

#unipizza {
display: table; width: 1px;
}

This will make the container's width as close to 1px as it can get
without overflowing. Since your image is wider than the longest
unbreakable character sequence, it'll get the width of the image.

If you then want those margins doing some centering (you had left and
right both set to 15em), add "margin: 0 auto" to the #unipizza selector
as well.

 

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

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