Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

1px Border

Options
  • 21-06-2006 2:40pm
    #1
    Closed Accounts Posts: 364 ✭✭


    How do I get a 1pixel border around 1 of my tables?

    The top table is how it looks now and the bottom is how I want it to look:

    border0hf.png

    This is the string of code I am using at the moment:
    <table width="800" border="1" align="center"><tr>
    	<td width="160" bgcolor="#00FFFF"><div align="center"><a href="index.php" class="style2">Home</a></div></td>
    	<td width="160" bgcolor="#00FFFF"><div align="center"><a href="files.php" class="style2">Files</a></div></td>
    	<td width="160" bgcolor="#00FFFF"><div align="center"><a href="pictures.php" class="style2">Pictures</a></div></td>
        <td width="160" bgcolor="#00FFFF"><div align="center"><a href="/blog/index.php" class="style2">Blog</a></div></td>
        <td width="160" bgcolor="#00FFFF"><div align="center"><a href="/forum/index.php" class="style2">Forum</a></div></td>
        <td width="160" bgcolor="#00FFFF"><div align="center"><a href="contact.php" class="style2">Contact</a></div></td>
    </tr></table>
    


Comments

  • Registered Users Posts: 35,524 ✭✭✭✭Gordon


    Remove the 1 pixel border on the table and include into the stylesheet on "style2":

    border: 1px solid black;

    (I think)


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    I'm not the best with CSS, but try the following:
    <style type="text/css">
    	#myTable
    	{
    		width: 800px;
    	}
    	#myTable td
    	{
    		background-color: 00FFFF;
    		border: 1px solid black;
    		text-align: center;
    		width: 160;
    	}
    </style>
    <table border="0" id="myTable" cellspacing="5" align="center">
    	<tr>
    		<td><a href="index.php" class="style2">Home</a></td>
    		<td><a href="files.php" class="style2">Files</a></td>
    		<td><a href="pictures.php" class="style2">Pictures</a></td>
    		<td><a href="/blog/index.php" class="style2">Blog</a></td>
    		<td><a href="/forum/index.php" class="style2">Forum</a></td>
    		<td><a href="contact.php" class="style2">Contact</a></td>
    	</tr>
    </table>
    


Advertisement