Centering textbox in textbox question


I would like to center the textbox in a textbox question.  I’ve tried a number of CSS classes and id’s but I can’t seem to get the class or id that specifically relates to the textbox input box element.  And I’m using

margin: auto;

to attempt to center the element.  Perhaps I’m using the wrong CSS statement to accomplish this task.

Any ideas?   Thank you.

Patrick McCabe answered
    IS 2.21K Rep.

    I think you are going to need to center the div which surrounds the text box, but to do that you will need to make sure that the div is only about as wide as the text box. You could do that for all text boxes with something like:

    .sg-input-text { width:300px; }

    .sg-control-text {width:300px; margin:auto; }


    You could modify further to select only a specific text box. 

    Patrick McCabe commented


      Question stats

      • Active
      • Views5608 times
      • Answers1 answer
      • Followers1 follower