Jump to content


Photo

Problem with html forms (select and option tags)


  • Please log in to reply
3 replies to this topic

#1 sford999

sford999
  • Members
  • PipPipPip
  • Advanced Member
  • 119 posts

Posted 09 September 2006 - 10:58 AM

Hi I`m having a few problems with the select and option tags

Basically if I have a normal drop down menu, the menu gets messed up like in the screenshot below

Messed up menu screenshot

but if I add the size="x" to the select tag the menu is in the correct place.

How the menu should be

The code is below if anyone can help?

HTML code

edit: added link to the html code as the forum wouldn`t let me include it in the code tags

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 09 September 2006 - 03:25 PM

DAft question but what is messed up with it exactly? I don't se anything wrong there... looks fine to me.
follow me on twitter @PHPsycho

#3 sford999

sford999
  • Members
  • PipPipPip
  • Advanced Member
  • 119 posts

Posted 09 September 2006 - 03:42 PM

Look at the screenshot HERE notice the menu is below the form, but if I add "size='x' to it it looks correct with the menu to the right, screenshot

So basically this breaks the page
<select name="category" class="textfield"> 
            <option value="1">A</option>
            ....snip....
            <option value="26">Z</option>
          </select>

And this fixes it
<select name="category" class="textfield" size="4"> 
            <option value="1">A</option>
            ....snip....
            <option value="26">Z</option>
          </select>

but I want the drop down list, not the multiple choice menu on the page

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 09 September 2006 - 04:05 PM

Change the "size=4" to "size=1".

Ken




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users