Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Results 1 to 6 of 6

Thread: HTML form elements

  1. #1
    lala is offline Senior Member
    Join Date
    Feb 2007
    Posts
    145

    Default HTML form elements

    Hi there,

    In a new form I would love to have exactly the same lenght for my single and multiline text areas. As you specify the width for the first one as "size" and the second one with "cols" I wondered how you would match the exact size? Is there any chance of also having a drop-down menu exactly the same length?

    It would be great if someone could help me out on this one ...

    lala

  2. #2
    OldDarkstarAccount is offline Senior Member
    Join Date
    Jan 2006
    Posts
    566

    Default

    Hi lala ,

    For the first thing , I think you can test , you add another col - test it , you add another one , test it

    Here is a pice of code , try it

    <form id="form1" method="post" action="">
    <p>
    <label>name <br />
    <input name="textfield" type="text" size="22" />
    </label>
    <label>email <br />
    <input type="text" name="textfield2" size="22"/>
    </label>
    </p>
    <p>
    <label>text<br />
    <textarea name="textarea" cols="22" rows=""></textarea>
    </label>
    </p>
    </form>
    actually size is equal to cols , but you have that another part with the scroll, so if you want your text area to be the same with the other field even if you have that scroll , you can use this :

    <form id="form1" method="post" action="">
    <p>
    <label>name <br />
    <input name="textfield" type="text" size="22" />
    </label>
    <label>email <br />
    <input type="text" name="textfield2" size="22"/>
    </label>
    </p>
    <p>
    <label>text<br />
    <textarea name="textarea" cols="19" rows=""></textarea>
    </label>
    </p>
    </form>
    For the drop down menu I can`t tell you anything because I`m not a JS knowner , yet , if you want to use

    <label>test 1
    <select name="select" multiple="multiple">
    <option>test 1 </option>
    <option>test 2 </option>
    <option>test 3 </option>
    </select>
    </label>
    The option group takes the size of the text present withing <option> </option> codes.

    Hope this was useful for you , I don`t know for sure if it`s what you need .

  3. #3
    lala is offline Senior Member
    Join Date
    Feb 2007
    Posts
    145

    Default

    Darkstar,

    Thank you! Change is accordingly and hopefully make it look much neater.

    Cheers,
    lala

  4. #4
    OldDarkstarAccount is offline Senior Member
    Join Date
    Jan 2006
    Posts
    566

    Default

    You welcome, hope that helped you. I think the best way to learn is to try , if you try once you get a result , the second time you try you get another result and so on. I also think it would be a good idea to use dw , you can see your results faster.

  5. #5
    Join Date
    Feb 2007
    Posts
    122

    Default

    You could also use CSS to control the width. I know that the cols and rows attribute for a textarea is different than it is for input types. If you set the width using CSS, you can make them look the same.

  6. #6
    lala is offline Senior Member
    Join Date
    Feb 2007
    Posts
    145

    Default

    Cheers

    I will try that as well and compare the results.

    You are right. Best is really "learning by doing". You can achieve most things (if not all) when you sit down and try to work it out. Also, the great thing is that there are places like this one, where nice chaps as you guys help out the intellectually disadvantaged

    Thank you,
    lala

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. The Meta Tag Elements
    By ovi in forum General Search Engine Discussions
    Replies: 9
    Last Post: 04-22-2008, 10:32 AM
  2. Contact us form
    By bushib in forum General Webmaster Talk
    Replies: 11
    Last Post: 05-26-2007, 10:19 AM
  3. Do you use Web 2.0 elements on your sites?
    By melkior_inactive in forum General Webmaster Talk
    Replies: 0
    Last Post: 05-10-2007, 02:14 PM
  4. form that count
    By addy in forum General Webmaster Talk
    Replies: 2
    Last Post: 02-07-2005, 04:14 PM
  5. How did you form your domain name?
    By temi in forum General Webmaster Talk
    Replies: 5
    Last Post: 10-01-2004, 06:42 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124