Prev: Float
Next: Tabs Using CSS1
From: shapper on 6 May 2010 07:08 Hello, I have a table as follows: <table class="Protocol" cellpadding="0" cellspacing="0"> Can I move the cellpadding="0" cellspacing="0" to the Protocol Css Class? How can I do that in CSS? Thank You, Miguel
From: Beauregard T. Shagnasty on 6 May 2010 07:22 shapper wrote: > I have a table as follows: > <table class="Protocol" cellpadding="0" cellspacing="0"> > > Can I move the cellpadding="0" cellspacing="0" to the Protocol Css > Class? > > How can I do that in CSS? Does td {margin: 0; padding: 0;} work for you? -- -bts -Four wheels carry the body; two wheels move the soul
From: shapper on 6 May 2010 07:32 On May 6, 12:22 pm, "Beauregard T. Shagnasty" <a.nony.m...(a)example.invalid> wrote: > shapper wrote: > > I have a table as follows: > > <table class="Protocol" cellpadding="0" cellspacing="0"> > > > Can I move the cellpadding="0" cellspacing="0" to the Protocol Css > > Class? > > > How can I do that in CSS? > > Does td {margin: 0; padding: 0;} work for you? > > -- > -bts > -Four wheels carry the body; two wheels move the soul I am not sure ... That is why I am asking. I don't know but I read somewhere some time ago that cellpadding="0" cellspacing="0" should always be added to a table but I am not sure if that's just to collapse the cells or if there is an equivalent in CSS.
From: Beauregard T. Shagnasty on 6 May 2010 08:07 shapper wrote: > "Beauregard T. Shagnasty" wrote: >> shapper wrote: >>> I have a table as follows: >>> <table class="Protocol" cellpadding="0" cellspacing="0"> >> >>> Can I move the cellpadding="0" cellspacing="0" to the Protocol Css >>> Class? >> >>> How can I do that in CSS? >> >> Does � td {margin: 0; padding: 0;} �work for you? > > I am not sure ... That is why I am asking. Why don't you try it and see if it does what you want. > I don't know but I read somewhere some time ago that cellpadding="0" > cellspacing="0" should always be added to a table but I am not sure > if that's just to collapse the cells or if there is an equivalent in > CSS. "should always be added?" No. ..protocol td { margin: 0; padding: 0; } if you have other tables where you *don't* want the lack of padding. What is the URL to your sample page? -- -bts -Four wheels carry the body; two wheels move the soul
From: Johannes Koch on 6 May 2010 08:17
shapper schrieb: > Hello, > > I have a table as follows: > > <table class="Protocol" cellpadding="0" cellspacing="0"> > > Can I move the cellpadding="0" cellspacing="0" to the Protocol Css > Class? > > How can I do that in CSS? table { border-collapse: collapse } th, td { padding: 0 } -- Johannes Koch In te domine speravi; non confundar in aeternum. (Te Deum, 4th cent.) |