What’s below is not True ! How to Use MacMini
Sep 12

At my office, i had some HTML things to work with .It was about dropdown combo box with more than 1 visible items ( this means HTML Select tag with size more than 1 like <select name=”macphobia” size=”2″> ) I was playing around with the w3cschools’ tryit editor in different browsers . It was working fine with expected results in IE , Mozilla firefox in my office Windows XP machine but i did the same thing in Safari in Windows the result was not what expected. Safari was not showing the number of visible items in Dropdown to what i had defined the HTML select tag rather it was showing all the elements in the drop down options. This was weird and surprising to me . Below are different results of my tries . It seems that whatever the number of size you give as visible items Safari will always show 4 itmes . If there are more than 4 items in the options of the dropdown or combobox then only Safari is showing Scroll bar buttons. I tried the same thing at my home computer which is Mac Leopard with Safari default browser . Safari in my Mac gave the same result as Safari did in WIndows platform but to another surprise Firefox in Mac didn’t also give me the expecetd result . It was able to show the visible items as configured in size attribute of Select HTML tag but there was no Scrolling buttons . Scrolling buttons not being present may be is a fault from Mac’s perspective and not from Firefox ?. But i tried the same in Opera browser in Mac and it was alright - Scroll bars were at right places. Opera resulted perfect in Mac in this experiment . You can also try the same in your different browser by going to this W3C tryit editor link

1. Safari in Windows and Mac producing same unexpected results

Select with multiple visible item

2. Internet Explorer in Windows producing as expected result

3. Firefox 3 in Mac also not producing exact expected result - No scroll buttons

4. Opera in Mac produced perfect and expected result

Related posts:

16 Responses to “Safari fails to obey the HTML tag”

  1. niraj priya INDIA Says:

    i know that dhtml having browser dependencies but html tag too having browser dependencies… intresting to know..

  2. MacPhobia INDIA Says:

    A very good comment about this post is here . Seems convincing to me.. http://www.aquataskforce.com/view/147#comment

  3. Duncan UNITED KINGDOM Says:

    Size is deprecated for HTML. You would use the drop down menu styled with CSS if required.

    For a list of HTML elements supported by Safari see…

    http://developer.apple.com/documentation/AppleApplications/Reference/SafariHTMLRef/Introduction.html#//apple_ref/doc/uid/30001261

  4. MacPhobia INDIA Says:

    @Duncan Thanks for your comment but can you please also share a link where it says that size for Select HTML tag is deprecated .

  5. chris UNITED STATES Says:

    It might be good form to use CSS but it doesn’t look like SIZE is deprecated. See link to W3’s HTML 4.01 reference for the SELECT tag which states that the SIZE attribute is still supported.

    http://www.w3.org/TR/html401/interact/forms.html#h-17.6

    I don’t suspect this will change in the next revision of the HTML specification. W3’s currrent HTML 5.0 draft is incomplete for the Web Forms definition but it currently says:

    “This section will be a rewrite of the HTML4 Forms and Web Forms 2.0 specifications, with hopefully no normative changes.”

    http://www.w3.org/TR/html5/tabular.html#the-select

  6. seo blog UNITED KINGDOM Says:

    This is an interesting article, your a very good writer,keep it up.

  7. Dhiraj NEPAL Says:

    Good one

  8. Paul UNITED STATES Says:

    Actually, safari will display correctly the size of rows if it is 4 or greater. Firefox also has a similar issue, where it needs to fit the scroll top/bottom arrow, depending on the font size could be 2 or more

  9. Kaamajakaaya INDIA Says:

    I keep listening to the news speak about getting free online grant applications so I have been looking around for the best site to get one.

  10. Christal Rascon AUSTRALIA Says:

    Hi nice post, i read your blog from time to time but i was wondering something. I also run a blog on a similar topic, but i get 1,000’s of spam comments and emails every day does that happen to you.. Any ideas to stop it? I currently have commenting disabled but i want to turn it back on.. Thanks!

  11. MacPhobia INDIA Says:

    @Above . you can use Akismet Plugin

  12. imehesz UNITED STATES Says:

    great post!

    this is clearly a bug (to me at least) that I can’t click with my mouse in a simple html SELECT form element :( it works on ie6, FF and Chrome. (if the size is bigger than 2)

    has anybody else noticed this?

    a
    b c

    thanks,
    –iM

  13. Evie Nott 174.36.200.58 not found Says:

    amazing stuff thanx :)

  14. Lee Haslam UNITED KINGDOM Says:

    Great read, nice post :)

  15. cFreed FRANCE Says:

    I just got the same problem and more: with size=”1″, displayed size is the number of options!
    And dynamically changing from szie=”…” to size=”1″ simply keeps previously displayed size unchanged, whatever it was.
    I don’t agree with comment #2 above: yes, UA is not required to present as a list box, but it doesn’t mean UA may ignore size.

  16. Nate CANADA Says:

    have you tried it with not just the tryit editor? Just with notepad?

Leave a Reply