View Full Version : Question about table border
kippie
09-27-2003, 01:04 PM
In the html below there is a table of 2x2 with a border of 1px. Is there a way to have the border on the right hand side 0px and all other border sides 1px?
This is the HTML:<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive 4">
<title>Welcome to Adobe GoLive 4</title>
</head>
<body>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#f74949">
<tr>
<td>a</td>
<td>b</td>
</tr>
<tr>
<td>c</td>
<td>d</td>
</tr>
</table>
</body>
</html>
Frank
09-30-2003, 03:53 PM
First I would suggest that you visit this site
http://www.javascriptkit.com/dhtmltutors/cssreference.shtml It should be of some help.
To answer your question, yes. You may want to make the border 2 or 3 px instead of 1. Just so people can see the color. In the css style you don't have to declare all the border colors individually "border-color: #f74949;" will work, but css allows you to have the four sides different colors. This code doesn't appear to work with Netscape, I'm not sure about other browsers.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.tborder {
border-top-width: 1px;
border-right-width: 0px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-color: #f74949;
border-left-color: #f74949;
border-bottom-color: #f74949;
}
-->
</style>
</head>
<body>
<table width="84%" height="159" border="1" cellpadding="0" cellspacing="0" class="tborder">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
You may want to check these links as well
http://www.w3schools.com/css/tryit.asp?filename=trycss_border-color
http://www.w3schools.com/css/css_border.asp
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.