css

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

css

Post by pinehead18 »

I'm looking for some way to create a css border that is very thin.

When you do a regualr border=1 it is thick.

Any suggestions?

Thank you for your help.
Anthony
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

table
{
border: 1px solid black;
}
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

I hate to be a n00b. But, how do i incorporate that into a table taht already exists? Do i need to re-create the table in that css thing. Or do i need to ust add that as a style , or name that table as an id then id it with my table?

how do i go about that?

thank you
Anthony
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that code will apply to all tables by default. If you want to restrict it down, you can use something like:

Code: Select all

table#some_id,
/* or */
table.some_class_name
{
/* css here */
}
User avatar
mendingo
Forum Commoner
Posts: 28
Joined: Sun May 23, 2004 1:27 pm

Post by mendingo »

I would do it by adding this to the <style> declaration (or css file):

Code: Select all

.thinBorder
&#123;
  border:1px solid black;
&#125;
then editing the table so it says

Code: Select all

<Table class="thinBorder" cellspacing=...>
If you want every table on the page to automatically look like that, then you just need to add this to the style:

Code: Select all

table
&#123;
  border:1px solid black;
&#125;
And you don't need to change your tables at all.
Post Reply