Alignment of a result field

Discussion in 'ASP General' started by eddie wang, Feb 10, 2004.

  1. eddie wang

    eddie wang Guest

    My field result is " Total Operating Revenue", which has spaces
    before the words.

    But, when I use the following html to display, I don't see the spaces.
    Why? Thanks.

    <td align="Justify" bgcolor="#FFFF99"><Font
    class=content4><%=ars.Fields("line_item_nm")%></font></td>


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    eddie wang, Feb 10, 2004
    #1
    1. Advertising

  2. Because HTML ignores white space. You can use replace(str, " ", "&nbsp;")
    or <PRE></PRE> maybe.

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "eddie wang" <> wrote in message
    news:upxrmt$...
    > My field result is " Total Operating Revenue", which has spaces
    > before the words.
    >
    > But, when I use the following html to display, I don't see the spaces.
    > Why? Thanks.
    >
    > <td align="Justify" bgcolor="#FFFF99"><Font
    > class=content4><%=ars.Fields("line_item_nm")%></font></td>
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Aaron Bertrand - MVP, Feb 10, 2004
    #2
    1. Advertising

  3. eddie wang

    J00 Moo Guest

    html issue --

    change the spaces to &nbsp; if you want them all to show up -- most browsers
    will only display one space in any given string of spaces. Personally I
    would set the table justification differently

    "eddie wang" <> wrote in message
    news:upxrmt$...
    > My field result is " Total Operating Revenue", which has spaces
    > before the words.
    >
    > But, when I use the following html to display, I don't see the spaces.
    > Why? Thanks.
    >
    > <td align="Justify" bgcolor="#FFFF99"><Font
    > class=content4><%=ars.Fields("line_item_nm")%></font></td>
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    J00 Moo, Feb 10, 2004
    #3
  4. eddie wang

    eddie wang Guest

    May I know how to use replace(str, " ", " ") or <pre></pre>?

    Thanks.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    eddie wang, Feb 10, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page