Reply to possible to make div width match content?

Your name:

Reply:


Posted by Stan R. on 04/01/06 05:08

Hello.

I'm trying to make a <div>, but from what I've observed, be default, it
trys to consume the most width possible.

What 'm have trouble doing is make it take the /minmal/ space possible,
like a table without any specified width.

What I'm really getting at is I'm trying to have a simple <div> with
left aligned text but be centered on the screen.

I've tried many variants of the following:

<center>
<div style="text-align: left">
Text that should be Left aligned, but centered on the screen.
</div>
</center>


So it looks like this

| Text that should be Left aligned, but centered on |
| the screen. |

^----- screne border -------------------------------------------------^

Thanks for any help. This is really driving me up the wall, especialyl
since I've bene workign with html since 1997! arrgh! :-)

--
Stan R.

[Back to original 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

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