Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select {
- border: 1px solid #65A6BA;
- font-size: 11px;
- margin-left: 22px;
- width: 166px;
- }
- <select>
- <option value="1">Some text</option>
- <option value="2">Text Larger Than the Width of select</option>
- <option value="3">Some text</option>
- <option value="4">Some text</option>
- <option value="5">Some text</option>
- </select>
- select {
- border: 1px solid #65A6BA;
- font-size: 11px;
- margin-left: 22px;
- width: 166px;
- overflow:visible ;
- }
- select:focus { width:auto ;
- position:relative ;
- }
- $el = $("select.fixedWidth");
- $el.data("origWidth", $el.outerWidth())
- $el.mouseenter(function(){
- $(this).css("width", "auto");
- })
- .bind("blur change", function(){
- el = $(this);
- el.css("width", el.data("origWidth"));
- });
Add Comment
Please, Sign In to add comment