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 4 of 4
  1. #1
    New Coder
    Join Date
    Apr 2007
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Separation bar with text in the middle

    Hello,

    I want to create a separation bar with text in the middle...something like this:


    random text random text
    random text random text

    ------------or--------------

    random text random text
    random text random text

    But the separation line has to be solid...how would I do this?
    -sushi
    -visit http://napkinz.com/index.php - funny comic updated weekly

  • #2
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Type in __________________text here_________________? If you're wanting to do it with tags, something along the lines of:

    Code:
    <div class="hrule"></div>Text here.<div class="hrule"></div>
    CSS would be something like:

    Code:
    .hrule {
        height: 1px;
        margin-top: 5px;
        border-top: 1px solid #000000;
    }
    Untested, but you get the gist. There is also the <hr> tag if you're not worried about using old style syntax.

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,672
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello sushi4664,
    Lots of hr examples here.
    Nothing at all wrong with MattF's suggestion either.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    Banned
    Join Date
    Jul 2010
    Posts
    66
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hi,
    Nice one his is what i' have been searching Nice post thanks Keep posting


  •  

    Posting Permissions

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