Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8061897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:29:29+00:00 2026-06-05T10:29:29+00:00

This won’t work: <select size=2> <option>Mars</option> <option>Earth</option> <option>Jupiter</option> </select> http://jsfiddle.net/uteb6/ It’s not possible to

  • 0

This won’t work:

<select size="2">
    <option>Mars</option>
    <option>Earth</option>
    <option>Jupiter</option>
</select>

http://jsfiddle.net/uteb6/

It’s not possible to set the size-attribute of select to 2 or 3. Any other value will work fine. Is there a solution? And why isn’t this possible?

Jquerys $('select').attr('size', '2'); won’t work either.

Tested with Safari 5.1.7

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:29:30+00:00Added an answer on June 5, 2026 at 10:29 am

    Seems like that behavior isn’t necessarily part of the specifications, at least in sitepoint:

    If the size is set to “1”, or omitted entirely, the select will render as a pull-down list. If the value is greater than “1”, the select renders as list of options. If the value of the size attribute is lower than the number of option elements contained in the select list, the browser will display a scroll bar control to indicate that there are more options to view or action below

    http://reference.sitepoint.com/html/select/size

    You can use height css to adjust it though as you need.

    http://jsfiddle.net/uteb6/10/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure why this won't work: SELECT u.id, u.tag, u.unit_type, Count(p.id) AS num_points
easy one. I just want to know why this won't work. I'm not asking
I know this won't work. I tried it in various forms and failed all
Any idea why this won't work? I m getting tags a user has set
I can't see why this won't work. I am performing lstrip() on the string
I can't figure out why this won't work, I've tried it 100 ways. The
How can I add key value pairs to an array? This won't work: public
why won't this work? function login(){ if(window.XMLHttpRequest){ ajax=new XMLHttpRequest(); }else if(window.ActiveXObject){ ajax=new ActiveXObject(Microsoft.XMLHTTP); }
Why won't this work? public static int[] GetListOfAllDaysForMonths() { static int[] MonthDays = new
Can someone please tell me why this won't work? NSAppleScript* playPause = [[NSAppleScript alloc]

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.