You are here: Re: space under text in a table « HTML « IT news, forums, messages
Re: space under text in a table

Posted by Roy A. on 02/26/07 10:42

Jukka K. Korpela skrev:
> Scripsit Gérard Talbot:

> > <h1 style="text-align: center; border: 3px solid black;">Worldwide
> > Wheelchair Accessible Washrooms</h1>
>
> No, it's not quite that simple. The current design makes the box as wide as
> the text (plus padding and border), whereas an <h1> element by default
> occupies the entire available width (normally, canvas width minus some
> paddings or margins of the <body> element). I'm afraid a single-cell table
> is the simplest way to achieve that (in a way that works on most browsers).
> For a CSS solution, you would probably have to use artificial <span> markup
> (<h1><span>...</span></h1>) and set the border and background for the
> <span>.

Another CSS solution, the other way around (with 'display:inline'):
<div style="text-align:center; margin: 1.5em 1.5em">
<h1 style="font-size:x-large; border: 3px solid black; padding:
0.25em; background-color:#f2e891; 0.25em; display:inline;">Worldwide
Wheelchair Accessible Washrooms</h1>
</div>

 

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

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