By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,493 Members | 1,936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,493 IT Pros & Developers. It's quick & easy.

Table with only vertical borders

P: n/a
Hi,

Below is code for creating a table with only vertical borders. I now use a
table cell of 1px to create this effect. Is there a CSS alternative?

Bye,

Fizgig

####################

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#000000" height="1px"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#000000" height="1px"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#000000" height="1px"></td>
</tr>
</table>
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a

"Fizgig" <fi****@NOequanimitySPAM.nl> wrote in message
news:40***********************@news.xs4all.nl...
Hi,

Below is code for creating a table with only vertical borders.
No, it creates a table with horizontal borders.
I now use a
table cell of 1px to create this effect. Is there a CSS alternative?

Bye,

Fizgig

####################

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#000000" height="1px"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#000000" height="1px"></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#000000" height="1px"></td>
</tr>
</table>


<style type="text/css">
.myTableStyle { border-collapse: collapse; }
.myTableStyle td { border-top: 1px solid black; border-bottom: 1px solid
black; }
</style>
....

<table class="myTableStyle" width="100%" border="0" cellpadding="0"
cellspacing="0">
<tr>
...
</tr>
<tr>
...
</tr>
<tr>
...
</tr>
</table>

Jul 20 '05 #2

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote:
Below is code for creating a table with only vertical borders.


No, it creates a table with horizontal borders.


So it seems, so presumably horizontal is what the OP wants. I have no
objection to the CSS solution, but I find it somewhat illogical to use
presentationa HTML markup...
<table width="100%" border="0" cellpadding="0" cellspacing="0">


.... which does _not_ correspond to the desired effect at all. So I would
suggest replacing border="0" by
border="1" rules="rows" frame="void"

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #3

P: n/a
hum...horizontal ofcourse ;-)
"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:Xn*****************************@193.229.0.31. ..
"Harlan Messinger" <h.*********@comcast.net> wrote:
Below is code for creating a table with only vertical borders.


No, it creates a table with horizontal borders.


So it seems, so presumably horizontal is what the OP wants. I have no
objection to the CSS solution, but I find it somewhat illogical to use
presentationa HTML markup...
<table width="100%" border="0" cellpadding="0" cellspacing="0">


... which does _not_ correspond to the desired effect at all. So I would
suggest replacing border="0" by
border="1" rules="rows" frame="void"

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Jul 20 '05 #4

P: n/a

"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:Xn*****************************@193.229.0.31. ..
"Harlan Messinger" <h.*********@comcast.net> wrote:
Below is code for creating a table with only vertical borders.
No, it creates a table with horizontal borders.


So it seems, so presumably horizontal is what the OP wants. I have no
objection to the CSS solution, but I find it somewhat illogical to use
presentationa HTML markup...
<table width="100%" border="0" cellpadding="0" cellspacing="0">


As do I. I neglected to continue whittling everything down. Sorry.

... which does _not_ correspond to the desired effect at all. So I would
suggest replacing border="0" by
border="1" rules="rows" frame="void"

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Jul 20 '05 #5

P: n/a
Thanks for the solution Jukka & Harlan! It works great.

Bye,

Ward

"Harlan Messinger" <h.*********@comcast.net> wrote in message
news:2h************@uni-berlin.de...

"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:Xn*****************************@193.229.0.31. ..
"Harlan Messinger" <h.*********@comcast.net> wrote:
> Below is code for creating a table with only vertical borders.

No, it creates a table with horizontal borders.


So it seems, so presumably horizontal is what the OP wants. I have no
objection to the CSS solution, but I find it somewhat illogical to use
presentationa HTML markup...
> <table width="100%" border="0" cellpadding="0" cellspacing="0">


As do I. I neglected to continue whittling everything down. Sorry.

... which does _not_ correspond to the desired effect at all. So I would
suggest replacing border="0" by
border="1" rules="rows" frame="void"

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.