cross-browser

Test if page has a horizontal scrollbar (computer & mobile devices)

我只是一个虾纸丫 提交于 2020-01-31 16:44:11
问题 On a web page, I need to test if there is a horizontal scrollbar or not (so that I programmatically change the css of some other element). Is there some way to get that information using jquery (or pure javascript)? I tested function isHorizontalScrollbarEnabled() { return $(document).width()!=$(window).width(); } but it does not seem to work with all browsers (does not work for example with a recent Samsung phone I tested). I need it to work with all browsers, including recent mobile devices

Test if page has a horizontal scrollbar (computer & mobile devices)

偶尔善良 提交于 2020-01-31 16:43:28
问题 On a web page, I need to test if there is a horizontal scrollbar or not (so that I programmatically change the css of some other element). Is there some way to get that information using jquery (or pure javascript)? I tested function isHorizontalScrollbarEnabled() { return $(document).width()!=$(window).width(); } but it does not seem to work with all browsers (does not work for example with a recent Samsung phone I tested). I need it to work with all browsers, including recent mobile devices

What the typical viewport size on a 1024x768 screen?

余生长醉 提交于 2020-01-28 18:02:23
问题 I am designing a web application, and I wish to know the largest size (x and y) that I can design for. As of January 2008, about half of users are using 1024x278 screens, and probably less than 10% are using smaller screens. (Phone and palmtop users are an exception here.) So we are designing for minimum screen size of 1024x768. However , that's the screen size, and when we are laying out our content we need to know the viewport size. There is evidence that most users have the browser

Playing multiple audio tracks on <video> element?

巧了我就是萌 提交于 2020-01-25 12:53:12
问题 I'm trying to create an accessible <video> element for a regular HLS video stream. However, I noticed that there is no cross-browser way to specify multiple audio tracks and switch between them efficiently, like you can with closed-captions. I've considered the audioTrack property but this does not work on many browsers. I've tried mediaGroup as well, which is also not cross-browser compatible. The only thing I've seen that may work is video.js (https://docs.videojs.com/docs/guides/audio

Trying to open a link in IE window from Chrome browser

落花浮王杯 提交于 2020-01-25 11:21:08
问题 I have seen this question been asked here Can I force a link to open in a specific browser? I found one solution which works eg. window.open("microsoft-edge:https://www.google.com"); This works for Edge but I am looking for similar solution to open in Internet Explorer. Tried ie , iexplore , internet-explorer Also i cant depend on users installing 'open in' extension in their browser. I could possibly go down the route of editing registry since webapp will be running in corporate systems ,

Fix the width and height of the table td

拟墨画扇 提交于 2020-01-25 11:21:04
问题 In my project, I am trying to fix the width and height of td 's by doing the following: td{ max-width:100px; max-height:100px; width:100px; height:100px; overflow:hidden; word-wrap:break-word; /* CSS3 */ } Here is the fiddle But as you can see in the fiddle, the td is increasing in height if the content in it is increasing. Anyway to fix it? Please give a solution which is cross-browser . If there is a fix available in extjs then that could also help me. PS: I know using div's it can be

CSS3 custom checkbox - cross-browser differences

a 夏天 提交于 2020-01-25 04:27:24
问题 I've recently been working on some custom checkboxes for a while now and have found it to be a challenge. However, I'm so close to finishing them and had been testing a lot in Chrome which I managed to get them perfect. I then checked in the other browsers and there were some distinct differences in how my after state was rendered. How do you fix those differences? is it even possible? Or do I just have to use an image? JSFIDDLE HTML: <div class="fb-checkbox"> <br> <br> <input id="item21_0

CSS3 custom checkbox - cross-browser differences

大兔子大兔子 提交于 2020-01-25 04:27:05
问题 I've recently been working on some custom checkboxes for a while now and have found it to be a challenge. However, I'm so close to finishing them and had been testing a lot in Chrome which I managed to get them perfect. I then checked in the other browsers and there were some distinct differences in how my after state was rendered. How do you fix those differences? is it even possible? Or do I just have to use an image? JSFIDDLE HTML: <div class="fb-checkbox"> <br> <br> <input id="item21_0

Automatic, soft hyphenation in CSS

六月ゝ 毕业季﹏ 提交于 2020-01-25 00:04:47
问题 In December last year, CSS3 Hyphens support supposedly came to Chrome . Also, IE should be on board, in addition to other major browsers. Update: Upon receiving the answers below, I understand that I misinterpreted the footnote on caniuse.com. It says: 'Only supports the auto value on Mac for now' . I interpreted this as meaning 'On the Mac, only the auto value is supported for now' . But what is really meant is 'The Mac is the only platform where the auto value is supported for now' .

Css IE6IE7/IE8 hover problem

放肆的年华 提交于 2020-01-24 21:19:28
问题 I added this bit of code for the input button used by.net for hover, the hover effect works fine on Firefox but does not work in any o the IEs how can i make it work in IEs #form-container input.prev_btn{ display: block; background:none repeat scroll 0 0 transparent; text-decoration:none; border:medium none; color:#5B522F; font-size:18px; left:285px;position:relative; text-transform:uppercase;top:34px;width:400px; } #form-container input.prev_btn:hover { background:none repeat scroll 0 0