Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 09:31 PM
Bart Plessers \(artabel\)
Guest
 
Posts: n/a
Default <table>: how to set cellpadding, spacing and alignment?

Hello,

I need a style that defines
-table cellspacing
-table cellpading
-alignment

I tried
<table class="TBLpageframe">
<tr class="TRpageframe">
<td class="TDpageframe">sample tekst</td>
</tr>
<tr class="TRpageframe">
<td class="TDpageframe">sample tekst</td>
</tr>
</table>

with style definition
..TDpageframe {
width : 80%;
height : 80%;
BORDER-RIGHT: #000000 5px solid;
BORDER-TOP: #000000 5px solid;
BORDER-LEFT: #000000 5px solid;
BORDER-BOTTOM: #000000 5px solid;
BACKGROUND: #f1cb2c;
padding-bottom : 20;
padding-left : 100;
padding-right : 20;
padding-top : 20;
margin-bottom : 20;
margin-left : 100;
margin-right : 20;
margin-top : 50;
}

but padding and margins do not seem to work.


can anybody give me the correct syntax/fields?

tia
bartp


--
HyperART
Paul Van Ostaijenlaan 4
3001 Heverlee



  #2  
Old July 20th, 2005, 09:31 PM
Evertjan.
Guest
 
Posts: n/a
Default Re: <table>: how to set cellpadding, spacing and alignment?

Bart Plessers (artabel) wrote on 08 okt 2003 in
comp.infosystems.www.authoring.stylesheets:[color=blue]
> but padding and margins do not seem to work.[/color]

Dag Bart,

A TD can have css padding, but I cannot imagine td margins:

Testing:

====================

<style>
table, td {border:dotted green 1px;}
.t1 td {padding:20px;}
.t2 td {margin:20px;}
</style>


<table class="t1">
<tr><td>qqq</td><td>qqq</td><td>qqq</td></tr>
<tr><td>qqq</td><td>qqq</td><td>qqq</td></tr>
<tr><td>qqq</td><td>qqq</td><td>qqq</td></tr>
</table>

<table class="t2">
<tr><td>qqq</td><td>qqq</td><td>qqq</td></tr>
<tr><td>qqq</td><td>qqq</td><td>qqq</td></tr>
<tr><td>qqq</td><td>qqq</td><td>qqq</td></tr>
</table>

========================

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  #3  
Old July 20th, 2005, 09:31 PM
David Dorward
Guest
 
Posts: n/a
Default Re: <table>: how to set cellpadding, spacing and alignment?

Bart Plessers (artabel) wrote:
[color=blue]
> Hello,
>
> I need a style that defines
> -table cellspacing[/color]

http://www.w3.org/TR/CSS2/tables.html#borders
[color=blue]
> -table cellpading[/color]

padding (but remember that its CELLpadding and not TABLEpadding)
[color=blue]
> -alignment[/color]

The usual rules apply depending on if the element is a block or inline.
http://dorward.me.uk/www/centre/ might be useful.

--
David Dorward http://dorward.me.uk/
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles