faqts : Computers : Programming : Languages : JavaScript : Tables

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 4 people (75%) answered Yes
Recently 3 of 4 people (75%) answered Yes

Entry

How to set the margins for tables, i.e i want the texts to be away from the table borders.

Mar 16th, 2002 20:28
Larry Bezeau, Jean-Bernard Valentaten, pushpa vathi,


Well basically this is not a js-question, but I'll answer it anyway.
You have to use CSS (cascading style sheets).
Example:
.tableContent {
  padding-left: 10px;
}
then in the td-tag:
<td class="tableContent">
If you wish to know more about this subject you might want to purchase 
a book about it. I'd recommend "Cascading Style Sheets" from Core.
HTH,
Jean