HighDots Forums  

<table>: how to set cellpadding, spacing and alignment?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss <table>: how to set cellpadding, spacing and alignment? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bart Plessers \(artabel\)
 
Posts: n/a

Default <table>: how to set cellpadding, spacing and alignment? - 10-08-2003 , 08:37 AM






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




Reply With Quote
  #2  
Old   
Evertjan.
 
Posts: n/a

Default Re: <table>: how to set cellpadding, spacing and alignment? - 10-08-2003 , 09:31 AM






Bart Plessers (artabel) wrote on 08 okt 2003 in
comp.infosystems.www.authoring.stylesheets:
Quote:
but padding and margins do not seem to work.
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)


Reply With Quote
  #3  
Old   
David Dorward
 
Posts: n/a

Default Re: <table>: how to set cellpadding, spacing and alignment? - 10-08-2003 , 01:03 PM



Bart Plessers (artabel) wrote:

Quote:
Hello,

I need a style that defines
-table cellspacing
http://www.w3.org/TR/CSS2/tables.html#borders

Quote:
-table cellpading
padding (but remember that its CELLpadding and not TABLEpadding)

Quote:
-alignment
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/


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.