Paragraph Tag Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Stang02GT
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    Paragraph Tag Question

    I know this is a really simple question but I am displaying contact information and i have the Company name and then some spaces and their phone number. When i view the page in the browser the space between the company name and number are gone and everything is run together.

    Code:
    <p>Company Name                       555-555-5555</P>
    Is what i want to show up but for some reason it is taking out the spaces. Any ideas?
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Multiple spaces are reduced to just one space. When you want them to display you can specify a 'non-breaking-space' for each blank space you want to show.
    &nbsp; is the entity used to represent a non-breaking space.

    So when you want to display the text 'X 2spaces Y 3spaces Z' you code this as
    Code:
    X&nbsp;&nbsp;Y&nbsp;&nbsp;&nbsp;Z
    Ronald

    Comment

    • Stang02GT
      Recognized Expert Top Contributor
      • Jun 2007
      • 1206

      #3
      Great thank you very much!

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        You are most welcome. See you around.

        Ronald

        Comment

        • Death Slaught
          Top Contributor
          • Aug 2007
          • 1137

          #5
          It is table like data so you could simply put it all in a table, but if that isn't what you're looking for then simply put the text you want pushed over in a span and give it a few margins.

          Thanks, Death

          Comment

          • drhowarddrfine
            Recognized Expert Expert
            • Sep 2006
            • 7434

            #6
            Death's right about using tables if you have more than one listing. The span idea is good, too, if you can list the phone number first.
            [HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
            <html>
            <head>
            <title></title>
            <style type="text/css">
            span{float:righ t}
            </style>
            </head>
            <body>
            <p><span>phon e</span>company</p>
            </body>
            </html>[/HTML]

            Comment

            • Death Slaught
              Top Contributor
              • Aug 2007
              • 1137

              #7
              Floating right..... why didn't I think of that??? ^_^

              Thanks, Death

              Comment

              Working...