Rectangle 27 14

I find the best way to handle long dropdown boxes is to put it inside a fixed width div container and use width:auto on the select tag. Most browsers will contain the dropdown within the div, but when you click on it, it will expand to display the full option value. It does not work with IE explorer, but there is a fix (like is always needed with IE). Your code would look something like this.

<div class="dropdown_container">
  <select class="my_dropdown" id="my_dropdown">
    <option value="1">LONG OPTION</option>
    <option value="2">short</option>
  </select>
</div>
div.dropdown_container {
    width:10px;
}

select.my_dropdown {
    width:auto;
}

/*IE FIX */
select#my_dropdown {
    width:100%;
}

select:focus#my_dropdown {
    width:auto\9;
}

I tested a similar example on Firefox 45.x, Chromium 39.x and IE 11.x and needed width:100%

css - Set width of dropdown element in HTML select dropdown options - ...

html css html-select
Rectangle 27 4

I think I found the solution compatible with FF31!!! Here are two options that are well explained at this link:http://www.currelis.com/hiding-select-arrow-firefox-30.html I used option 1: Rodrigo-Ludgero posted this fix on Github, including an online demo. I tested this demo on Firefox 31.0 and it appears to be working correctly. Tested on Chrome and IE as well. Here is the html code:

<!DOCTYPE html>
<html>
    <head>
    <meta charset="utf-8">
    <title>Custom Select</title>
    <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div class="custom-select fa-caret-down">
            <select name="" id="">
                <option value="">Custom Select</option>
                <option value="">Custom Select</option>
                <option value="">Custom Select</option>
            </select>
        </div>
    </body>
</html>

and the css:

.custom-select {
    background-color: #fff;
    border: 1px solid #ccc;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0 0 2em;
    padding: 0;
    position: relative;
    width: 100%;
    z-index: 1;
}

.custom-select:hover {
    border-color: #999;
}

.custom-select:before {
    color: #333;
    display: block;
    font-family: 'FontAwesome';
    font-size: 1em;
    height: 100%;
    line-height: 2.5em;
    padding: 0 0.625em;
    position: absolute;
    top: 0;
    right: 0;
    text-align: center;
    width: 1em;
    z-index: -1;
}

.custom-select select {
    background-color: transparent;
    border: 0 none;
    box-shadow: none;
    color: #333;
    display: block;
    font-size: 100%;
    line-height: normal;
    margin: 0;
    padding: .5em;
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.custom-select select::-ms-expand {
    display: none; /* to ie 10 */
}

.custom-select select:focus {
    outline: none;
}
/* little trick for custom select elements in mozilla firefox  17/06/2014 @rodrigoludgero */
:-moz-any(.custom-select):before {
    background-color: #fff; /* this is necessary for overcome the caret default browser */
    pointer-events: none; 
    z-index: 1; /* this is necessary for overcome the pseudo element */
}

Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why its there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline.

Thanks for editing your question, however it still doesn't actually answer the question by itself. Please copy the parts of those links that will help the questioner such that they would be able to solve their problem just be reading your Answer.

html - How to remove the arrow from a select element in Firefox - Stac...

html css firefox css3
Rectangle 27 9

Hi In storyboard select Tab bar (Is Tab Bar Controller Scene > Tab Bar Controller > Tab Bar ), in the attribute inspector, uncheck Translucent box. This action fix your problem. (But there are many things, "Hide bottom bar when pushed" is to toolbar).

but now the tab bar is visible when I push VC, I need it to be hidden.

At least, in the example project you have shared (AutoLayoutTest), if you only uncheck translucent property in the tab bar, the tab bar disappear when you push and the violet view appear in its place. (Test you own project)

ios - Auto Layout and "Hide bottom bar when pushed" - Stack Overflow

ios objective-c storyboard uitabbarcontroller autolayout
Rectangle 27 1

I had a problem with the examples above, and the problem was caused by the fact that my select box values are prefilled with fixed length strings of 6 characters, but the parameter being passed in wasn't fixed length.

I have an rpad function which will right pad a string, to the length specified, and with the specified character. So, after padding the parameter it works.

$('#wsWorkCenter').val(rpad(wsWorkCenter, 6, ' '));


function rpad(pStr, pLen, pPadStr) {
if (pPadStr == '') {pPadStr == ' '};
while (pStr.length < pLen)
    pStr = pStr + pPadStr;
return pStr; 
}

javascript - jQuery - setting the selected value of a select control v...

javascript jquery
Rectangle 27 1

I had a problem with the examples above, and the problem was caused by the fact that my select box values are prefilled with fixed length strings of 6 characters, but the parameter being passed in wasn't fixed length.

I have an rpad function which will right pad a string, to the length specified, and with the specified character. So, after padding the parameter it works.

$('#wsWorkCenter').val(rpad(wsWorkCenter, 6, ' '));


function rpad(pStr, pLen, pPadStr) {
if (pPadStr == '') {pPadStr == ' '};
while (pStr.length < pLen)
    pStr = pStr + pPadStr;
return pStr; 
}

javascript - jQuery - setting the selected value of a select control v...

javascript jquery
Rectangle 27 1

I had a problem with the examples above, and the problem was caused by the fact that my select box values are prefilled with fixed length strings of 6 characters, but the parameter being passed in wasn't fixed length.

I have an rpad function which will right pad a string, to the length specified, and with the specified character. So, after padding the parameter it works.

$('#wsWorkCenter').val(rpad(wsWorkCenter, 6, ' '));


function rpad(pStr, pLen, pPadStr) {
if (pPadStr == '') {pPadStr == ' '};
while (pStr.length < pLen)
    pStr = pStr + pPadStr;
return pStr; 
}

javascript - jQuery - setting the selected value of a select control v...

javascript jquery
Rectangle 27 1

I had a problem with the examples above, and the problem was caused by the fact that my select box values are prefilled with fixed length strings of 6 characters, but the parameter being passed in wasn't fixed length.

I have an rpad function which will right pad a string, to the length specified, and with the specified character. So, after padding the parameter it works.

$('#wsWorkCenter').val(rpad(wsWorkCenter, 6, ' '));


function rpad(pStr, pLen, pPadStr) {
if (pPadStr == '') {pPadStr == ' '};
while (pStr.length < pLen)
    pStr = pStr + pPadStr;
return pStr; 
}

javascript - jQuery - setting the selected value of a select control v...

javascript jquery
Rectangle 27 5

The selected answer didn't quite work for me as I had to tap the EditText box once, and then tap it again before the OnClickListener would fire. I was able to fix this by replacing OnClickListener with OnTouchListener, just in case anyone has run into a similar issue here is what my code looks like:

Calendar myCalendar = Calendar.getInstance();

DatePickerDialog.OnDateSetListener date = new 
DatePickerDialog.OnDateSetListener() {

    @Override
    public void onDateSet(DatePicker view, int year, int monthOfYear,
            int dayOfMonth) {
        // TODO Auto-generated method stub
        myCalendar.set(Calendar.YEAR, year);
        myCalendar.set(Calendar.MONTH, monthOfYear);
        myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
        updateLabel();
    }

};
edittext.setOnTouchListener(new View.OnTouchListener() {

    @Override
    public void onTouch(View v, MotionEvent event) {
        if(event.getAction() == MotionEvent.ACTION_DOWN) {
            new DatePickerDialog(classname.this, date, myCalendar
                    .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
                    myCalendar.get(Calendar.DAY_OF_MONTH)).show();
        }
    }
});

private void updateLabel() {

    String myFormat = "MM/dd/yy"; //In which you need put here
    SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);

    edittext.setText(sdf.format(myCalendar.getTime()));
}

android - Datepicker: How to popup datepicker when click on edittext -...

android
Rectangle 27 9

Although all of these answers saved me a lot of work, none of them fully worked for me. After selecting a date, the binded value would not update. I could only get it to update when changing the date value using the keyboard then clicking out of the input box. I fixed this by augmenting RP Niemeyer's code with syb's code to get:

ko.bindingHandlers.datepicker = {
        init: function (element, valueAccessor, allBindingsAccessor) {
            //initialize datepicker with some optional options
            var options = allBindingsAccessor().datepickerOptions || {};

            var funcOnSelectdate = function () {
                var observable = valueAccessor();
                observable($(element).datepicker("getDate"));
            }

            options.onSelect = funcOnSelectdate;

            $(element).datepicker(options);

            //handle the field changing
            ko.utils.registerEventHandler(element, "change", funcOnSelectdate);

            //handle disposal (if KO removes by the template binding)
            ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
                $(element).datepicker("destroy");
            });

        },
        update: function (element, valueAccessor) {

            var value = ko.utils.unwrapObservable(valueAccessor());
            if (typeof(value) === "string") { // JSON string from server
                value = value.split("T")[0]; // Removes time
            }

            var current = $(element).datepicker("getDate");

            if (value - current !== 0) {
                var parsedDate = $.datepicker.parseDate('yy-mm-dd', value);
                $(element).datepicker("setDate", parsedDate);
            }
        }
    };

I suspect putting the observable($(element).datepicker("getDate")); statement in its own function and registering that with options.onSelect did the trick?

Thanks a million! I tried every example and then found this one at the bottom of the page and it finally works. I just have a small tweak in mine so that the bound value stays in the same "server friendly" format that it came down in. In your funcOnSelectdate function use this: observable($.datepicker.formatDate('yy-mm-dd', $(element).datepicker('getDate')));

I think if you override the onSelect function it won't raise the change event...

knockout.js - jQuery UI datepicker change event not caught by Knockout...

jquery-ui knockout.js
Rectangle 27 9

Although all of these answers saved me a lot of work, none of them fully worked for me. After selecting a date, the binded value would not update. I could only get it to update when changing the date value using the keyboard then clicking out of the input box. I fixed this by augmenting RP Niemeyer's code with syb's code to get:

ko.bindingHandlers.datepicker = {
        init: function (element, valueAccessor, allBindingsAccessor) {
            //initialize datepicker with some optional options
            var options = allBindingsAccessor().datepickerOptions || {};

            var funcOnSelectdate = function () {
                var observable = valueAccessor();
                observable($(element).datepicker("getDate"));
            }

            options.onSelect = funcOnSelectdate;

            $(element).datepicker(options);

            //handle the field changing
            ko.utils.registerEventHandler(element, "change", funcOnSelectdate);

            //handle disposal (if KO removes by the template binding)
            ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
                $(element).datepicker("destroy");
            });

        },
        update: function (element, valueAccessor) {

            var value = ko.utils.unwrapObservable(valueAccessor());
            if (typeof(value) === "string") { // JSON string from server
                value = value.split("T")[0]; // Removes time
            }

            var current = $(element).datepicker("getDate");

            if (value - current !== 0) {
                var parsedDate = $.datepicker.parseDate('yy-mm-dd', value);
                $(element).datepicker("setDate", parsedDate);
            }
        }
    };

I suspect putting the observable($(element).datepicker("getDate")); statement in its own function and registering that with options.onSelect did the trick?

Thanks a million! I tried every example and then found this one at the bottom of the page and it finally works. I just have a small tweak in mine so that the bound value stays in the same "server friendly" format that it came down in. In your funcOnSelectdate function use this: observable($.datepicker.formatDate('yy-mm-dd', $(element).datepicker('getDate')));

I think if you override the onSelect function it won't raise the change event...

knockout.js - jQuery UI datepicker change event not caught by Knockout...

jquery-ui knockout.js
Rectangle 27 1

I fixed it by creating a new form from the table that called SavedApplications then i replaced the generated text boxes with new combo boxes & i choosed to get the data from the table that called Data then i mentioned the selected item saved in the the text box field that removed in SavedApplications

Save data from MS Access form to another table in the same MS Access d...

database ms-access
Rectangle 27 3

"Guys the yajl/yajl_parse.h error is confusing and the reason the demo works is that the files that need yajl are excluded from building, even though theyre in the project. To fix in your own project go into the MGTwitter folder via xcode and select each .m file with the term yajl in it (there should be 6), right-click -> Get Info -> Targets tab and uncheck the box next to your app name. HTH, Jon"

MGTwitterEngine for Iphone SDK errors - Stack Overflow

iphone
Rectangle 27 3

This seems to fix the after-effect of the yellow re-populating on mous...

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus
input:-webkit-autofill, 
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  border:none !important;
  -webkit-text-fill-color: inherit !important;
  -webkit-box-shadow: 0 0 0px 1000px #FFFFFF inset;
  transition: background-color 5000s ease-in-out 0s;
}

Just one thing, your should add box-shadow: 0 1px 0 0 #26a69a, inset 0 0 0px 9999px white so that your box-shadow line stays when you have material-design inputs ;)

haha thanks for the tip! I'm an analyst; html and css are not my thing

html - Remove the yellow background on input on autofill - Stack Overf...

html css forms css3 input
Rectangle 27 3

This seems to fix the after-effect of the yellow re-populating on mous...

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus
input:-webkit-autofill, 
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  border:none !important;
  -webkit-text-fill-color: inherit !important;
  -webkit-box-shadow: 0 0 0px 1000px #FFFFFF inset;
  transition: background-color 5000s ease-in-out 0s;
}

Just one thing, your should add box-shadow: 0 1px 0 0 #26a69a, inset 0 0 0px 9999px white so that your box-shadow line stays when you have material-design inputs ;)

haha thanks for the tip! I'm an analyst; html and css are not my thing

html - Remove the yellow background on input on autofill - Stack Overf...

html css forms css3 input
Rectangle 27 0

Could we see some of your HTML and CSS that is relevant to the question please? Might just be a problem with font-size being declared in px instead of em, or it could be something else entirely. No way to know without some code to look at.

just open some select input with option data and zoom-in and zoom-out in IE for example w3schools.com/tags/tryit.asp?filename=tryhtml_option

html - How to fix shifting text in select box while zooming in IE? - S...

html internet-explorer drop-down-menu zoom
Rectangle 27 0

The problem seems to be that the select box within each styled <div> is visible. You can fix it by setting the opacity of each <select> to 0 in IE9, or using filter:alpha(opacity = 0) in older IEs

this fixed it for me when I added the style in the developer toolbar..?

css3 - IE css fix help needed. Rectangular box appears in dropdown - S...

css css3
Rectangle 27 0

It's a known issue in older versions of IE (I think IE7 fixed it). The select box will always be rendered on top of the other HTML elements. I believe it is because the select box is a Windows control and is not managed by the browser, or something along that line.

In any case, the most common solutions to this type of issue are: 1) Hiding the select box when the hidden/clipped control has the focus. 2) Putting an IFrame behind the control. The IFrames have the same properties as the select boxes, and also are always on top of the other HTML elements, including select tags. See http://weblogs.asp.net/bleroy/archive/2005/08/09/how-to-put-a-div-over-a-select-in-ie.aspx for an example of how to do it. That's of course an ugly hack.

html - IE7 z-index problem - Stack Overflow

html css internet-explorer-7 z-index
Rectangle 27 0

That's an interesting fix. The only problem I see with that is the select box is missing the downward pointing arrow on the right which might confuse users.

css - How to expand 'select' option width after the user wants to sele...

css html-select content-length
Rectangle 27 0

Vexe's answer worked the best for me, but I had to modify it to fix a couple of issues. This solution will highlight the correct object if the same object is in the list box multiple times. Also, this solution prevents multi selected objects from flip flopping when they hit the top or bottom of the list box and the button continues to be pressed multiple times.

private void btnMoveUp_Click(object sender, EventArgs e)
    {
        // find the lowest index of non selected items
        int lowestIndexNotSelected = listBox.Items.Count - 1;
        for (int i = listBox.Items.Count - 1; i >= 0; i--)
        {
            if (!listBox.SelectedIndices.Contains(i))
            {
                lowestIndexNotSelected = i;
            }
        }

        listBox.BeginUpdate();
        int numberOfSelectedItems = listBox.SelectedItems.Count;
        for (int i = 0; i < numberOfSelectedItems; i++)
        {
            // only if it's not a lower inde than the lowest non selected index
            if (listBox.SelectedIndices[i] > lowestIndexNotSelected)
            {
                // the index of the item above the item that we wanna move up
                int indexToInsertIn = listBox.SelectedIndices[i] - 1;
                // insert UP the item that we want to move up
                listBox.Items.Insert(indexToInsertIn, listBox.SelectedItems[i]);
                // removing it from its old place
                listBox.Items.RemoveAt(indexToInsertIn + 2);
                // highlighting it in its new place (by index, to prevent highlighting wrong instance)
                listBox.SelectedIndex = indexToInsertIn;
            }
        }
        listBox.EndUpdate();
    }

    private void btnMoveDown_Click(object sender, EventArgs e)
    {
        // find the highest index of non selected items
        int highestIndexNonSelected = 0;
        for (int i = 0; i < listBox.Items.Count; i++)
        {
            if (!listBox.SelectedIndices.Contains(i))
            {
                highestIndexNonSelected = i;
            }
        }

        listBox.BeginUpdate();
        int numberOfSelectedItems = listBox.SelectedItems.Count;
        // when going down, instead of moving through the selected items from top to bottom
        // we'll go from bottom to top, it's easier to handle this way.
        for (int i = numberOfSelectedItems - 1; i >= 0; i--)
        {
            // only if it's not a higher index than the highest index not selected
            if (listBox.SelectedIndices[i] < highestIndexNonSelected)
            {
                // the index of the item that is currently below the selected item
                int indexToInsertIn = listBox.SelectedIndices[i] + 2;
                // insert DOWN the item that we want to move down
                listBox.Items.Insert(indexToInsertIn, listBox.SelectedItems[i]);
                // removing it from its old place
                listBox.Items.RemoveAt(indexToInsertIn - 2);
                // highlighting it in its new place (by index, to prevent highlighting wrong instance)
                listBox.SelectedIndex = indexToInsertIn - 1;
            }
        }
        listBox.EndUpdate();
    }

c# - How to move item in listBox up and down? - Stack Overflow

c# .net winforms listbox
Rectangle 27 0

To fix this, I went to help - Install New Software... - from the "work with" drop-down box I selected http://dl-ssl.google.com/android/eclipse/ - I then check marked "Developer Tools" and hit the Next button. I then followed the prompts and it basically did a re-install. It took less than 5 minutes. That resolved the error.

Now Im back up and running, and I got the lastest version of Eclipse.

Thanks a lot Nadir

This answer has the best aproach to the problem I had. When Window - Preferences - Android doest not allow you to modify the SDK path, you should reinstall ADT plugin.

Location of the android sdk has not been setup in the preferences in m...

android