467,910 Members | 1,786 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

Table with only vertical borders

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
  • viewed: 26670
Share:
5 Replies

"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
"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
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

"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
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.

Similar topics

1 post views Thread by leecho | last post: by
4 posts views Thread by justdummy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.