...

View Full Version : Help with Borders in HTML and CSS



treeleaf20
09-15-2011, 08:32 PM
All,
I'm trying to put borders around certain places and I can't figure out how to do it. I have the following code:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="padding:0px; margin:0px;">
<table width="590">
<tr>
<td colspan="3" rowspan="2" style="border-right-color:#7D7D7D; border-width:5px;">
<img src="images/TopLeftText.png"> </td>
<td width="314" height="124" valign="bottom"><img src="images/news.png"></td>
<td width="174"><img src="images/logo.png" width="146" height="122"></td>
</tr>
<tr>
<td height="56" colspan="2" background="images/LeftSidebarBlueBackground.png"><img src="images/you_can_use.png"></td>
</tr>
<tr>
<td width="25" rowspan="2" background="images/LeftSidebarBlueBackground.png">
</td>
<td width="125" height="31" background="images/LeftSidebarBlueBackground.png"></td>
<td width="25" rowspan="2" background="images/LeftSidebarBlueBackground.png"></td>
<td colspan="2" rowspan="2" valign="top">
<div style="padding:10px; ">
<h1>Headline 1</h1>
<p>Igna faci ero conullaortie dolor at. Henit, vulluptatie cortinc illamet, sit, quamet, conseq-uisl ullutate tissequat ipeugait autat lum ipissed modiamconse tat.
</p>
<p>Gue facillamet, sit nullandit, quate dolore dio deliusciduisim dolum dolor incip exer alissed minisim verit volesequisi tionsequat. Putpat vercidunt vent venim nibh eniam irit nim velisi.
</p>
<p>Doloreet, cons elit illa conum nullaore vulluptatio et ing eu faccummy nullum vulpute mincidu iscipsum- mod duisi.
</p>
<h1>Headline 2</h1>
<p>Lit lobor sit wissi te delis dolut wis adit alis et, quis nullaorer si te molorem nim dolenit lum et lobore dunt niamcommy nos nonulla alisim dignim eum zzriusci blan hent lortionsenit et wisi.
</p>
</div>
</td>
</tr>
<tr>
<td background="images/LeftSidebarGradientFillBackground.png" valign="top" bordercolor="#5C7E94"><div style="padding:10px"><img src="images/attorney1.png" width="100" height="100"><br>
<br>Name<br>
Title<br>
</div>
</td>
</tr>
<tr>
<td colspan="5" height="75px" background="images/footerbackgroundcolor.png" valign="middle">
<div align="center"><font color="#FFFFFF">Footer</font><br></div>
</td>
</tr>
</table>
</body>
</html>


You can see that in my upper left column I tried to add a right border but it still shows a space between my left column and my right column. Here is that code:


<td colspan="3" rowspan="2" style="border-right-color:#7D7D7D; border-width:5px;">
<img src="images/TopLeftText.png">
</td>


Any ideas what I'm doing wrong? I don't want any spaces between my columns so I'm trying to specify where my borders should be. Thanks in advance!

vikram1vicky
09-15-2011, 08:43 PM
use border-collapse:collapse property in your <table> tag

treeleaf20
09-15-2011, 10:39 PM
Yes that worked great. Thanks. However, now if I do want to add a specific border at a certain spot how could I do that? Thanks in advance again



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum