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
  1. Home
  2. Web Development
  3. Vertical Align text in a Textbox

Vertical Align text in a Textbox

Scheduled Pinned Locked Moved Web Development
questionjavascripthtmlcss
2 Posts 2 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
    Subrahmanyam K
    wrote on last edited by
    #1

    Hi Friends, As per the requirement, I have adjusted the height of the HTML Textbox to 10px and set the font-size to 10px using style property. When the page is loaded, the text is vertically aligned middle to the textbox in IE so that the text is visible completely. But in the browsers Mozilla Firefox and Netscape, the text is not vertically aligned, so the bottom portion of the text seems to be chopped in the textbox. How can I vertical align the text in the Textbox using CSS/Javascript or some other way? Thanks in advance. Subrahmanyam K

    G 1 Reply Last reply
    0
    • S Subrahmanyam K

      Hi Friends, As per the requirement, I have adjusted the height of the HTML Textbox to 10px and set the font-size to 10px using style property. When the page is loaded, the text is vertically aligned middle to the textbox in IE so that the text is visible completely. But in the browsers Mozilla Firefox and Netscape, the text is not vertically aligned, so the bottom portion of the text seems to be chopped in the textbox. How can I vertical align the text in the Textbox using CSS/Javascript or some other way? Thanks in advance. Subrahmanyam K

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Set the vertical padding to zero, and set line-height to 10px. --- b { font-weight: normal; }

      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