Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Centering text

Centering text

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-netquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SiliconScout
    wrote on last edited by
    #1

    Is there any way to center or justify text that is in a text box on an ASP.NET web page? I don't see alignment as a property of the actual control so is there some way that I can add this functionality? If I can't add it, then is there some way to exit the HTML to change the justification for me? Thanks

    M M 2 Replies Last reply
    0
    • S SiliconScout

      Is there any way to center or justify text that is in a text box on an ASP.NET web page? I don't see alignment as a property of the actual control so is there some way that I can add this functionality? If I can't add it, then is there some way to exit the HTML to change the justification for me? Thanks

      M Offline
      M Offline
      MoustafaS
      wrote on last edited by
      #2

      Use these Results[^] for the CascadeStyleSheet,it may help.

      1 Reply Last reply
      0
      • S SiliconScout

        Is there any way to center or justify text that is in a text box on an ASP.NET web page? I don't see alignment as a property of the actual control so is there some way that I can add this functionality? If I can't add it, then is there some way to exit the HTML to change the justification for me? Thanks

        M Offline
        M Offline
        minhpc_bk
        wrote on last edited by
        #3

        Hi there, You simply set the text-align attribute of the style to center:

        style="text-align:center"

        For more information, see text-align Attribute | textAlign Property[^]

        S 1 Reply Last reply
        0
        • M minhpc_bk

          Hi there, You simply set the text-align attribute of the style to center:

          style="text-align:center"

          For more information, see text-align Attribute | textAlign Property[^]

          S Offline
          S Offline
          SiliconScout
          wrote on last edited by
          #4

          Thank you 1000x I knew it would be something so simple as to make me feel like a twit! Thanks again.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups