Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 10 of 10

Thread: Horizontal Rule

  1. #1
    Junior Member ozxar's Avatar
    Join Date
    Jan 2004
    Posts
    3
    Member #
    4719
    can someone tell me how to have text inside a horizontal rule that would look like ??

    -------Text-------

  2.  

  3. #2
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    A horizontal rule can't have text in it. Horizontal rules have few attributes. Read about them here.

  4. #3
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    I think your best bet to solve this situation is to create an image, with a line through it.
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  5. #4
    Member Skotster's Avatar
    Join Date
    Jan 2004
    Posts
    43
    Member #
    4675
    an image will look best but if you need it to be code
    Code:
    <nb><hr width="25%">Your text Here<hr width="25%"></nb>
    i didn't test it but it should work
    Rembember, You're Unique
    Just Like Everybody Else

  6. #5
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    What is the <nb> tag?? I think it doesn't exist

  7. #6
    Member Skotster's Avatar
    Join Date
    Jan 2004
    Posts
    43
    Member #
    4675
    no break
    Rembember, You're Unique
    Just Like Everybody Else

  8. #7
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    it doesn't appear on the list of tags that spluff has posted...

  9. #8
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    This seems to work.
    HTML Code:
    <p>Text before HR</p>
    <div style="position:relative;height:16px;">
    <div style="position:absolute;left:0px;right:0px;text-align:center;"><hr /></div>
    <div style="position:absolute;left:0px;right:0px;text-align:center;width:100%">
    <span style="background-color:white;">Text</span>
    </div>
    </div>
    <p>Text after HR</p>
    You need height:16px in the first div for it to render properly in IE.
    You also need the background-color attribute for the text, otherwise the HR goes right underneath it.
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  10. #9
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    The no break tag is <nobr>

    There is a built-in HTML functionality for boxed off sections, using fieldsets, which allow a title to be placed within the line. May not suit your needs, but try it out:
    Code:
    <fieldset>
        <legend>Title</legend>
        <p>Content</p>
    </fieldset>

  11. #10
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    You could also use relative positioning:

    Code:
    <hr />
    <span style="top: -10px; background-color: white; text-align: center">Title</span>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:57 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com