Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Oct 2009
    Posts
    438
    Thanks
    9
    Thanked 7 Times in 7 Posts

    Help with Borders in HTML and CSS

    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:
    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:
    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!

  • #2
    Regular Coder
    Join Date
    Jul 2011
    Location
    India
    Posts
    496
    Thanks
    3
    Thanked 57 Times in 56 Posts
    use border-collapse:collapse property in your <table> tag

  • #3
    Regular Coder
    Join Date
    Oct 2009
    Posts
    438
    Thanks
    9
    Thanked 7 Times in 7 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •