Meaningless Drivel is fun!
The moose likes HTML, CSS and JavaScript and the fly likes html Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "html" Watch "html" New topic


sunil menon

Joined: Feb 21, 2001
Posts: 2
How do I draw a vertical line in html. Is there any tag for drawing a vertical line in html ?
Angela Poynton
Ranch Hand

Joined: Mar 02, 2000
Posts: 3143
I'm moving this to the HTML and Javascript Forum!

Pounding at a thick stone wall won't move it, sometimes, you need to step back to see the way around.
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
There is no tag for drawing a vertical line, but you can always use a scaled image.
Create a 1 pixel square gif file using any paint program, any color you like, call it (say) 1x1.gif and include the following html:
<img src='1x1.gif' width='1' height='100'>
to get a rectangle 1 pixel wide and 100 pixels high, ie. a vertical line!

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
You can also use a table and have the first row 1 pixel wide and give it a background color of whatever you want. This way is will expand dynamically based on the content of the next column.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Are you trying to simulate frames? What do you want to do with your line?
I agree. Here's the link:
subject: html
It's not a secret anymore!