FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Tables

 


calicamper
I'm having trouble getting a color on the border of my table. My code is:

Quote:
<table border="1" bordercolor="#004400" cellspacing="1" width="680" id="Outer for border">


This gets the border to show in IE, but when I compile it in Dreamweaver I get an error that says:

Quote:
The tag: "table" doesn't have an attribute: "bordercolor" in currently active versions.[HTML 4.0]


I want to conform to the standards, but I couldn't find anything on the w3 website, http://www.w3.org/TR/html401/struct/tables.html#borders, that let me accomplish the same effect. Anyone out there have any ideas?
Mosquito.Tyler
According to this, the bordercolor attribute does not exist.

To apply border color with CSS, this is the code you need.

Code:

<html>
<head>
<style>
table, td{
border:1px #ff0000 solid;
}
</style>
</head>
<body>
<table border="1">
   <tr>
      <td>This and That</td>
      <td>This and That</td>
      <td>This and That</td>
   </tr>
      <tr>
      <td>This and That</td>
      <td>This and That</td>
      <td>This and That</td>
   </tr>
</table>
</body>
</html>


You can change the color, thickness, and type as needed.
Go HERE for more info on CSS borders.
varun_dodla
I suggest you go with the CSS approach as suggested above because it gives you a better control and freedom and also u can change the border style from solid to thin, dotted etc.
Good luck Smile
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.