Safari and Chrome: problem editing input 'size' attribute on the fly
I doubt that the size attribute would work cross browser. I would switch to setting the maxlength and css width of the input field rather than changing the size attribute.
Looks like a bug/unsupported feature in webkit. Which Safari/Chrome share.
HTML select font-size
You'll need to turn off the default OS styling with: -webkit-appearance: none;
(If you're making a highly-styled dropdown, this is essentially a complete style reset.)
Live Demo
You could also try: -webkit-appearance: menulist-button;
(Though I'm not sure how other style effects will affect this one.)
HTML input button css-height not working on Safari and Chrome
Change it from <input>
to <button>
and add -webkit-appearance: none;
to the start of your CSS, eg:
.submitbtn {
-webkit-appearance: none;
height: 50px;
background-color:#FFF;
color:#666;
font-weight:bold;
border: solid #666 1px;
font-size: 14px;
}
Styling a select box with a size attribute?
Since you're open to use jQuery and since original SELECT doesn't suit your need, I suggest using Selectable from jQueryUI
If this doesn't suit you, Google for others, but search for "listbox" (e.g. "jQuery listbox), you will find alternatives like http://kalnitsky.org/projects/listbox.js/en/.
Most of them won't convert your existing SELECT element into a new one, but there're some that would.
Related Topics
Progress Bar with HTML and CSS
<H1>, <H2>, <H3>... Tags, Inline Within Paragraphs (<P>)
Does Svg Xmlns Attribute Value Requires Protocol? Can It Be Https or Relative
Media Queries Not Working Inside an Iframe
Div Element Won't Stay at The Bottom When iOS 7 Virtual Keyboard Is Present
CSS: Outline-Offset Alternative for Ie
Schema.Org/Microdata Markup for List of Recent Posts Without Providing "Author"/"Publisher"
How to Get Rid of Margin Around My HTML Content
How to Create a Curved Speech Bubble
CSS Align Images and Text on Same Line
:Before &&: After Pseudo Elements Not Showing Firefox
How to Make a 45 Degree Responsive Ribbon with Folded Corner
Are Void Elements and Empty Elements The Same