Hello!

I am fairly new to HTML and CSS, and I am making my webpage. It has small table to the left for navigation and then the main table is in the middle. The main table has two columns that I made with the normal old html <tr> and <td> (no fancy CSS columns :/).

Anyways, I want a 1px black border around the perimeter of the WHOLE table, not including the inside... does that make since? In other words I just want a border around the table, but I don't want it to divide my table up. Is there a way I can use CSS or HTML to achieve this? I tried using a <div id="#"> and then using CSS to add a border but I clearly failed, it just put a border waaay off of where I wanted it.

Thanks for any help!

Recommended Answers

All 3 Replies

Member Avatar for diafol
table{
 border: 1px solid black;
}

OK I would put
<div id="table-border"></div>
around your table.

And add
#table-border{
border: 1px solid #000000;
}
to your CSS file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.