Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2003
    Location
    California
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts

    a vertical <hr> tag

    How can I make a vertical <hr> tag?

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Use a div similar to this

    <div style="width:6px;height:100px;border-right:6px inset blue"></div>

  • #3
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But instead of width: 6px; it should be width: 0px; as the pixels of width will be extra to the width of the border. Remember the box model

    And remember you have to use the boxmodel hack for IE5:
    Code:
    .hr { 
      height: 100px;
      border-right: 6px solid blue;
      width: 6px;
      voice-family: "\"}/*\"";
      width: 0px;}
    /* */
    
    <div class="hr"></div>
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •