homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

Straight Vertical Line ...
Using HTML and/or CSS ?

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


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




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

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)

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?



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

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)

Very simple: [w3.org...]



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

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



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

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

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.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved