You are here: Re: Fieldset CSS Centering « HTML « IT news, forums, messages
Re: Fieldset CSS Centering

Posted by Steve Pugh on 03/14/06 18:58

effendi@epitome.com.sg wrote:

>I created a CSS file which defined the attributes of my fieldset.
>However, inspite of trying various combination, I cannot "centre" my
>fieldset, it is flushed to the left.
>
>Here is my CSS file.
>
>body {
>text-align:center; /* for IE */
>align:center;
>}
>div#formfields { width:800px;
>align:center
>}

There's no such CSS property as align.

>fieldset {
>background-color: #E3EEF7;
>width:800px; /* or a percentage, or whatever */
>margin-bottom: 10px
>align:center
>}

>Can any tell me what I did wrong?

You made up a CSS property.

To center a block set the margin-left and margin-right properties to
auto. Works in all modern and semi-modern browsers (even IE6 if you
trigger Standards mode).

Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>

 

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

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