Welcome to WebmasterWorld Guest from 54.166.54.215

Forum Moderators: not2easy

Straight Vertical Line ...

Using HTML and/or CSS ?

   
4:18 pm on Aug 9, 2002 (gmt 0)

10+ Year Member



Hii,

Is it possible to draw a straight vertical line using HTML and/or CSS without using a 1 x 1 pixel image..??

Like, I have two columns ( colspan=2 )..without giving a border, i want a vertical line ( solid or dotted ) seperating the two .

Can it be done, something similiar to <HR> for horizontal line !?...some one pls help me with the code !

Thanks for the help in advance

Cheers
:)

4:29 pm on Aug 9, 2002 (gmt 0)

10+ Year Member



Why would you want to do this without a border? Just put a css border (right or left) on the appropriate table cell and apply padding to both to give some space.
4:32 pm on Aug 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is no vertical equivalent to <hr> - you can create a <div> to serve the purpose but this is a definite kludge.

Why not use the border property?

[w3.org...]

4:33 pm on Aug 9, 2002 (gmt 0)

10+ Year Member



Could you pls help me with the css left/right code for the border ??

I hope by using this border, i won't get a border for the entire table ??

Thanks again
:)

4:41 pm on Aug 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Very simple: [w3.org...]

[w3.org...]

4:56 pm on Aug 9, 2002 (gmt 0)

10+ Year Member



papabaer : thanks a lot for the links..I am checking them out !

Cheers
:)

5:00 pm on Aug 9, 2002 (gmt 0)

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member




<table>
<tr>
<td class="rightborder">Blah blah</td>
<td class="leftborder">blah de blah</td>
</tr>
</table>

and in your CSS...

.rightborder {
border-right: 1px solid #000000;
]
.leftborder {
border-left: 1px solid #000000;
border-style: dashed;
}

The last one just makes sure that IE5 will actually show the border as it doesn't support the dashed property.

Nick

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month