justuptime.com - monitor your servers & websites

Table Borders

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

He has: 6 posts

Joined: Mar 2005

Hi guys,

I have an html table that i would like to put a cool border around.

anyone have any good tips????

cheers

Jonno

Roo's picture
Developer

She has: 836 posts

Joined: Apr 1999

Do it in the css:

.tableborder {
border: 1px solid #DCDCDC;
}

You can also use:
any pixel size

Or instaed of pixel size:
thin
medium
thick

Or:

double
dotted
dashed
groove
ridge
inset
outset

• Edit •
This is in an external CSS file, are you familair with that?

Called into the code within the tag

He has: 6 posts

Joined: Mar 2005

cheers

sorted it out now

JabezDesign's picture

He has: 3 posts

Joined: Apr 2005

DJ Jonno wrote: Hi guys,
I have an html table that i would like to put a cool border around.
anyone have any good tips????
cheers
Jonno

Here try this (I hope you are familiar with css codes):

<html>
<head>
<title></title>
<style type="text/css">
body{background-color:#CCCCCC;}
.nonwhite{background-color:#6633CC;}
.white{background-color:#FFFFFF;}
.title{font-family:verdana; font-weight:normal; font-size:15px; color:#000000;}
</style>
</head>
<body>
<table width="450" border="0" cellspacing="0" cellpadding="0" height="50">
  <tr>
    <td>
      <table width="95%" border="0" cellpadding="1" cellspacing="0" class="nonwhite">
        <tr>
          <td>
            <table width="100%" border="0" cellpadding="5" cellspacing="0" class="white">
              <tr>
                <td class="title">Comments Goes Here</td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>

The attribute cellpadding="1" is the width of the border around the table.

The attribute class="nonwhite" is the color of the border, play around with this in the css part of the page, and change to whatever color you want.

The attribute class="white" is the background color of your table itself, you can also change this.

Of course mess around with the width, height, etc., etc.

Hope this helps!
Good Luck!

Jabez Design Solutions
Creativity with no limits
Website Address: http://www.jabezdesign.com/
Email Address: [EMAIL=buddy@jabezdesign.com]buddy@jabezdesign.com[/EMAIL]