You are here: Re: Sentance or Caption Under Picture « HTML « IT news, forums, messages
Re: Sentance or Caption Under Picture

Posted by G�rard Talbot on 11/24/06 19:03

Jim Moe wrote :
> Gérard Talbot wrote:
>>> I have never had any trouble making web pages & overcoming a few html
>>> challenges along the way. But I cannot figure out how to center a
>>> sentance or title under a picture. Do I need to use <caption> within
>>> the <table> tag? Thanks.
>>>
>> My recommendation:
>> <p style="text-align: center;"><img src="..." width="..." height="..."
>> alt="..."><br>Your sentence... </p>
>>
> For the caption to center properly the <p> must be given the same width
> as the <img>.

What do you mean by "properly"?

Imagine this:


x

y


The "x" character is centered and the "y" character is centered too.
They just happened to be centered in 2 paragraph blocks which have a
specific width.
In my example, the width was not defined or, if you prefer, the width
was "auto". So, it was using as much as its container width was
providing. That's a lot more useful than setting the width of a
paragraph block.

Gérard
--
remove blah to email me

 

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

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