Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE11 Not enough width for the label in some cases #623

Open
fabianpiau opened this issue Feb 27, 2017 · 7 comments
Open

IE11 Not enough width for the label in some cases #623

fabianpiau opened this issue Feb 27, 2017 · 7 comments

Comments

@fabianpiau
Copy link

The plugin is working but the size is quite big for some labels. It is not the case for other browsers.

See the official examples: http://bootstrapswitch.com/examples.html

328b3cf8-fb8d-11e6-8c36-89b1015b8388

For some reason 'ON' takes too much space with IE11, I manually change the width to 46px and the switch looks good again.

It was fixed to 45px but not enough, it is 44px with Firefox and it works fine. The computation of this dynamic value needs to be adapted to IE 11.

@jbajou
Copy link

jbajou commented Apr 4, 2017

Experiencing the same issue on our side with IE11 and IE10. Any fix would be appreciated.

@MRJBGO
Copy link

MRJBGO commented May 29, 2017

I have the same problem with IE11 on the OFF part. It seems that the font we use is slightly bigger, so if I force 13px in this css property : ".bootstrap-switch .bootstrap-switch-label", it works ...

@fabianpiau
Copy link
Author

Yes I have added this ugly quick fix hack, font size 13px was not enough in my case, I used 12px.

/** Hack ie 10 and > **/
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
 .bootstrap-switch .bootstrap-switch-handle-off,.bootstrap-switch .bootstrap-switch-handle-on,.bootstrap-switch .bootstrap-switch-label {font-size:12px}
}

@jbajou
Copy link

jbajou commented Jun 27, 2017

Any idea when a fix will be released ?

@xiaolongWangDev
Copy link

Run into the same issue today. overriding the following works for me. The content was set to "\200b"

.bootstrap-switch span::before {
    content: normal;
}

@mobilutz
Copy link

mobilutz commented Jan 8, 2018

@xiaolongWangDev Do you have any issues with this change?
We are thinking about implementing this as well, but it seems that the \200b zero width whitespace was added intentionally: Julusian@bbd9754

@razi241
Copy link

razi241 commented Oct 27, 2018

While digging into same issue I found using blank space HTML Code " " helped. (ampersand#160;)
• I had to make checkbox adhere to col-md-2 size
• I had to keep labels in one line in contrast to above shown snapshots where ON and OFF moved to two rows.
• I tried different tweaks like:
//$("#controlId").bootstrapSwitch({ "handleWidth": "110", "labelWidth": "110" });

Solution worked for me
• Surround label text e.g. "Repeat" as shown with above HTML code
• When left enabled side button label is sized to appropriate bootstrap width, the right disabled side's label length doesn't matter

Snap attached,
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants