/    Sign up×
Community /Pin to ProfileBookmark

Cellpadding, Cellspacing and Table Border not validated

NONE

to post a comment
CSS

15 Comments(s)

Copy linkTweet thisAlerts:
@JonaSep 21.2004 — [font=trebuchet ms]You can't use those attributes to refer to class names.[/font]

<i>
</i>/* Awesome class name for a table, by the way. ;) */
table.top {
border-collapse: collapse;
border-width: 1px;
}

table.top td, table.top th {
padding: 5px;
}
Copy linkTweet thisAlerts:
@designauthorSep 21.2004 — NONE
Copy linkTweet thisAlerts:
@JonaSep 21.2004 — [font=trebuchet ms]Dude, maybe you should try learning what a class [b]is[/b] before trying to code in CSS. :rolleyes: Use my code, with this HTML.[/font]

<i>
</i>&lt;table class="top"&gt;
&lt;tr&gt;
&lt;th&gt;Heading 1&lt;/th&gt;
&lt;th&gt;Heading 2&lt;/th&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Entry 1&lt;/td&gt;
&lt;td&gt;Entry 2&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
Copy linkTweet thisAlerts:
@designauthorSep 21.2004 — NONE
Copy linkTweet thisAlerts:
@JonaSep 21.2004 — [font=trebuchet ms]If you don't want headings then take them out.[/font]
Copy linkTweet thisAlerts:
@designauthorSep 21.2004 — NONE
Copy linkTweet thisAlerts:
@JonaSep 21.2004 — <i>
</i>table.top {
border-collapse: collapse;
border-style: solid;
border-width: 1px;
border-color: #000;
}


<i>
</i>&lt;table class="top"&gt;
Copy linkTweet thisAlerts:
@designauthorSep 21.2004 — NONE
Copy linkTweet thisAlerts:
@Paul_JrSep 21.2004 — [font=palatino linotype]Change your table tag to this:[/font]
<i>
</i>&lt;table class="top"&gt;

[font=palatino linotype]Then add the following CSS code to your table.top styles[/font]
<i>
</i> border: 1px solid #fff;

[font=palatino linotype]Then the following to your stylesheet:[/font]
<i>
</i> table.top td {
padding: 5px;
border: 1px solid #fff;
}


[font=palatino linotype]

Also, remove the HTML code from your stylesheet. :rolleyes:[/font]
Copy linkTweet thisAlerts:
@designauthorSep 22.2004 — NONE
Copy linkTweet thisAlerts:
@Paul_JrSep 22.2004 — [font=palatino linotype]Try this, if it does not work, I suggest you visit [url=http://www.w3.org/Style/CSS/]the CSS spec.[/url] and read it until it makes sense.[/font]

[upl-file uuid=49769a66-f8aa-4b23-aac4-58945bd73949 size=4kB]index.zip[/upl-file]
Copy linkTweet thisAlerts:
@skifreak85353May 23.2005 — How would one code CSS so that there is no cell spacing as well?
Copy linkTweet thisAlerts:
@SanimMay 23.2005 — Tip - don't use a table (if this is for a layout).
Copy linkTweet thisAlerts:
@the_treeMay 23.2005 — How would one code CSS so that there is no cell spacing as well?[/QUOTE]td {padding: 0; margin: 0;}
Copy linkTweet thisAlerts:
@skifreak85353May 23.2005 — td {padding: 0; margin: 0;}[/QUOTE]

hmmm the margin didn't seem to change anything. This is my code...



[CODE]table.normal td{
border-collapse:collapse;
padding:0;
margin:0;

}
[/CODE]
×

Success!

Help @design spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...