Adding borders to selected sides?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

The Infinity

Thread Starter
Joined
May 11, 2005
Messages
579
Is it possible to add a border to the right and left side of a table and not the top and bottom?
 
Joined
Nov 18, 2006
Messages
10
starcab said:
No I don't think so.
Um actually you can by adding a somple CSS file to the .html file, just add this to the table and add a class tot he table and name this border. As you can see below there is no top and bottom, just left side and right side are all encased in a border.

I keep making mistakes in typing I needs som sleep :(

So here is a simple example.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="border">This is a test page</td>
  </tr>
</table>
</body>
</html>
Code:
.border {
	border-right: thin solid #222;
	border-left: thin solid #222;
	margin:0;
	padding: 10px
}
 
Joined
Aug 7, 2005
Messages
2,183
Yeah, just use some CSS.
HTML:
style="border-left: 1px solid #FF0000; border-right: 1px solid #FF0000;"
 
Joined
Nov 18, 2006
Messages
10
Yeah that's the one I could not remember, I was tired and sleepy and could not remember, this is probably the easiest way, although CSS style make it look neat instead of a load of messed up code on the page.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top