Log in

View Full Version : table border question



mayde
09-19-2005, 01:59 AM
Hi. I'm sorry, this might be a fairly simple HTML question, so I apologize, but I can't seem to find the answer anywhere.

I just switched from PC to Mac, from FrontPage to Dreamweaver, and I'm trying to make a new website layout. When I create a table, how do I make it so that only the left and top border of one cell is visible, while no other borders appear? I know it's possible because it was a simple option in FrontPage but I can't seem to find any option or any way of doing it in DreamWeaver. If someone could tell me how to do it in DreamWeaver or even just give me the HTML for this, I would really appreciate it! Thanks so much!!

Mayde

jscheuer1
09-19-2005, 04:16 AM
I just switched from PC to Mac, from FrontPage to Dreamweaver . . .Hmm, from the frying pan into the fire . . .

Most of us 'hacks' here in the forums use a text editor to write all HTML and other code. What you are asking can be done a few different ways and there are other options that influence a table and cell(s) appearance that you haven't specified. Here is a good css method to achieve this, put this style section in the head of the page:

<style type="text/css">
.borderless {
border:none;
}
.borderless td {
border:none;
width:50%; /* this property/value pair optional */
}
#left_top {
border-top:1px solid black;
border-left:1px solid black;
}
</style>Here is an example mark-up that could go with it. You can choose which cell gets the special treatment by assigning it the id:

<table class="borderless">
<tr>
<td>Hi</td><td id="left_top">&nbsp;there</td>
</tr>
<tr>
<td>mayde</td><td>row 2, cell 2</td>
</tr>

</table>