Jump to content
Sign in to follow this  
lak

How to put a vertical line in html

Recommended Posts

Hi I want to know that, how to put vertical line in html. for horizontal line we will use " <hr/>, Like that is there option for vertical line

Share this post


Link to post
Share on other sites

Well it depends on your structure. Say you had two divisions floated next to each other, you could give one of them a border-right of 1px or more

<div style="float:left; width:300px; border-right:2px solid #666666; margin-right:5px; ">Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah</div><div style="float:left; width:300px; ">Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah</div>

Share this post


Link to post
Share on other sites

There's no tag like <hr> for vertical lines. Maybe this would do something like it:

<div style="display: inline; width: 3px; height: 300px; background: #000000; border: 1px solid #CC0000; clear: both; overflow: hide;"> </div>

Share this post


Link to post
Share on other sites

their is a height property (size is deprecated) that you can use of the HR tag. IE, however, limits it to 100 regardless of the value over 100. Firefox does notuse this for IE (stacking them) <hr style="height:100px;width:2px;margin-bottom:-8px;padding:0px;" /> <hr style="height:100px;width:2px;margin-top:-8px;padding:0px;" />use this for Firefox <hr style="height:200px;width:2px;" />

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...