Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TD align to center
Message
De
26/09/2012 08:17:07
 
Information générale
Forum:
HTML5
Catégorie:
Autre
Divers
Thread ID:
01553647
Message ID:
01553658
Vues:
55
>My default stylesheet has td text-align:left because that's the 90% case. If I need centered or right aligned I override the setting for the specific element typically with a right-align or center-align class (or element style if you have to).
>
>Not specifying text-align: left causes a lot of problems as the setting otherwise is 'inherit'. If the table's outer element has text-align: center all columns in the table will center which is surely not what you want.
>
>In my standard CSS file I have:
>
>
>td
>{
>    text-align: left;
>    vertical-align: top;
>    padding: 4px;
>}
>table.grid>tbody>tr>td
>{
>	border: solid 1px lightgrey;	
>}
>th
>{
>	font-weight: bold;
>	text-align: center;
>}
>
>
>Hope that helps,

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform