Link to home
Start Free TrialLog in
Avatar of chongkeng_woon
chongkeng_woon

asked on

How to draw vertical line using HTML tag

<HR> tag is used to draw horizontal line in HTML ...how about drawing a vertical line?
i would like to draw a 500px vertical line ...so, i tried ..

<HR width=2 noshade size="500">

however, it is not successful, that vertical line was not 500px in length...is there any idea?

thanks


Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

You can use a 1 x 1 pixel graphic, and then set it's height accordingly, get the idea?
if use horizontal line, it can be like as:

<hr width="1" size="2000" noshade>
>>however, it is not successful, that vertical line was not 500px in length...is there any idea?
Not too sure about that, try use my 1st suggestion instead, good luck
Avatar of chongkeng_woon
chongkeng_woon

ASKER

what do you mean by 1 x 1 pixel graphic ...i don't quite understand ...
do you have the HTML script for this ?
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Where do you want to 'draw' this line? If you simple have a block of content which you want to add a line to on the right-side it'd be dead-easy using css. For instance if you have some text in a p-tag and want a line on the right side of it:
<p style="border: 1px solid black; border-width: 0 1px 0 0;">Just add any amound of text in this paragraph, a line will always be shown at the right side of the entire text...</p>

 Martin
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i would feel that my answer is the first and easiest provided.  
flow79,
 
I believe a closer review of the comments will show the ryancys and mreuring both had valid and easily implemented answers. Also, a  test of your answer will show that it will not work as written. It needs some additional code (i.e. a float or position attribute) or it will not let other content sit next to it.

My comment was just a summary or restatement and doesn't merit consideration.
nope