How to do cellpadding in CSS?
I can't for the life of me figure out how to set the padding for a table using css. In html it is cellpadding="4" but padding:4px or padding:10% does nothing, how can I do this?
I can't for the life of me figure out how to set the padding for a table using css. In html it is cellpadding="4" but padding:4px or padding:10% does nothing, how can I do this?
disaster-master posted this at 01:57 — 19th February 2002.
She has: 2,154 posts
Joined: May 2001
See if this works.
td {
padding-top: 4px;
padding-bottom: 4px;
padding-left: 4px;
padding-right: 4px;
}
I just found this tut also.
http://www.w3schools.com/css/css_examples.asp
disaster-master posted this at 02:13 — 19th February 2002.
She has: 2,154 posts
Joined: May 2001
I had put 4pt by mistake in my first reply to your post and forgot to add the ;
it should be 4px;
oh and it works too.
Kode posted this at 02:18 — 19th February 2002.
They have: 5 posts
Joined: Feb 2002
I was doing padding on the table, not the td. I can only get this to work if it is for the html tag td. But working nevertheless. I did
td { padding: 4px }
joor.com
rcfiles.com
kinetixrc.com
disaster-master posted this at 02:49 — 19th February 2002.
She has: 2,154 posts
Joined: May 2001
try this
table {padding-left : 4px;}
Busy posted this at 03:26 — 19th February 2002.
He has: 6,151 posts
Joined: May 2001
unless your site is a personal site I wouldnt get into cellpadding etc to much as its not very universal yet
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.