49 users online (1 members and 48 guests)  


  Results 1 to 5 of 5

Related

  1. Preselecting form elements    Forum: PHP Forum
    Replies: 1
  2. Hiding text within' form submission?    Forum: HTML Forum
    Replies: 1
  3. help checking form elements in external js file    Forum: Javascript Forum
    Replies: 2
  4. text form question    Forum: Website Scripts Forum
    Replies: 0
  5. Block elements within inline elements    Forum: CSS Forum
    Replies: 6
  1. #1
    julianfornis's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2003
    Posts
    3

    Indenting Text in Form Elements

    Thank you in advance for all assistance.

    I am attempting to indent the "value" text in an input form field, with no success.

    Can anyone tell me if this is possible?

    Thank you.
    Julian

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    hiya, welcome to the forums!

    The normal 'text-indent' does not work with form inouts (as you have already tried) but faking it with padding-left works. Example -

    Code:
    <input type="text" value="stoaty" style="padding-left: 12px;">
    Hope that helps.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    julianfornis's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2003
    Posts
    3
    Hello Dean,

    Your assistance got me thinking and I figured out where I made an error. I was placing the "class" reference to a stylesheet in the <td> and not the <input> tag. Like this:

    <td class="fiel_user"><input type="text" name="username" value="username"></td>

    instead of this:

    <td><input type="text" name="username" value="username" class="fiel_user"></td>

    Once I changed that, it achieved my desired effect.

    Thank you very much!

    Julian

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    I see! well, I kinda helped
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    julianfornis's Avatar
    New User

    Status
    Offline
    Join Date
    Mar 2003
    Posts
    3
    Hey Dean,

    Probably wouldn't have figured it out without your help!

    Thanks!

    Julian



Tags for this Thread