Results 1 to 5 of 5

Thread: HR (horizontal rule) code?

  1. #1
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default HR (horizontal rule) code?

    I was wondering if there was a way to have a horizontal rule to continue before and after a word? Kinda of like

    is there a code for that?
    ------------------
    Check out my site here and let me know what you think

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You could use CSS to position it like that, but there is no default way to make it stay on the same line.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    Why type of CSS code would I need?
    ------------------
    Check out my site here and let me know what you think

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    It might depend on the exact situation/layout, but I imagine it would be similar to the CSS you would use to position a div in an unusual way. For example, float:left might help. I'd have to play with it to see how it works. You could also use CSS to try and override the 'block' aspect of an <hr>. Maybe just style="display:inline;" would be enough.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Apr 2010
    Posts
    89
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Default

    Code:
    <head>
    <style>
    hr{
    margin-left:60px;
    }
    
    .line{
    float:left;
    width:100%;
    margin-top:-18px;
    }
    
    .text{
    float:left;
    }
    </style>
    </head>
    <body>
    
    <div class="text">Jan 13th</div> 
    <div class="line"><hr /></div>
    
    </body>

Bookmarks

Posting Permissions

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