Table Borders - But Only Around The Table!

by
Apollo-Articles
Profile picture of Apollo-Articles
Posts: Threads: Thanks: Account age: less than a second
2 replies
Hi Everyone,

I'd like to add a thin black border around a table but only around it not within it (which happens when the change the html to:
HTML Code:
<table border="1">
.

I tried adding the following to my stylesheet:

Code:
table {
border: 1px solid black;
}
This worked but I have several tables on one page and only want the border around one table how can I achieve this?

Thanks,

Sam

EDIT: I just worked it out.

If your interested I add the following to my stylesheet:

Code:
.table2 {
border: 1px solid black;
}
While I added the following to my HTML page:

HTML Code:
<table class="table2">
instead of
HTML Code:
<table>
Sam
#borders #table

Trending Topics