cross-browser

webkit browsers are getting elements.width() wrong

女生的网名这么多〃 提交于 2019-12-07 07:18:01
问题 I am trying to get the correct calculated width of an container. All the browsers are getting the calculated width correctly. (even IE) but surprisingly Chrome and webKit browsers are getting a wired number. I am trying to get the total width of the <li> including its border and padding + its margin-right. Then multiply that by the length of <li> 's to get the exact width needed to hold them I tracked down the problem with the width calculation. Can anyone tell me whats wrong. Thanks HTML

jQuery and Browser Compatibility

你离开我真会死。 提交于 2019-12-07 05:20:41
问题 Yikes! I've been a developer for many years and have always tried to emphasize code that is compatible with as many systems as possible. Recent, I purchased the book jQuery in Action and started reading it. I am very disturbed by the fact that the included source code doesn't appear to work correctly on either of the browsers on my current computer. Specifically, I downloaded the book's source code and selected the "jQuery Selectors Lab" for Chapter 2. But it doesn't look how it does in the

Split <ul> to two columns with CSS2

。_饼干妹妹 提交于 2019-12-07 05:08:11
问题 Is there a good cross browser solution for splitting a single <ul> into two columns, or is the best approach still to use two separate lists floated next to each other? I'm looking for a single solution, so no CSS3 goodness is permitted if it would require alternative HTML to support older browsers. Required browser support IE7+, FF3+. 回答1: I made a JSFiddle with basic non-CSS3 that seems to work. Should be cross-browser and might be a good base for you to start tinkering a specific solution.

Javascript: Inconsistency when assigning a named function to a variable (named function expression)

我与影子孤独终老i 提交于 2019-12-07 04:58:58
问题 Can anyone explain the difference in behaviour between Internet Explorer and Firefox in regards to the below: var myNamespace = (function () { var exposed = {}; exposed.myFunction = function myFunction () { return "Works!"; } console.log(myFunction()); // IE: "Works!" // Firefox: ReferenceError: myFunction is not defined console.log(exposed.myFunction()); // IE: "Works!" // FF: "Works!" return exposed; })(); console.log(myNamespace.myFunction()); // IE: "Works!" // FF: "Works!" In internet

Angular 2 animations/transitions only working on chrome?

て烟熏妆下的殇ゞ 提交于 2019-12-07 04:16:48
问题 As the title says, I've been building a web app using Angular2 and decided to test cross-browser, only to find the nifty animations working only in Chrome. Here is what one of my components looks like if that might make any difference: @Component({ selector: 'contact', templateUrl: 'app/about.component.html', styleUrls: ['app/about.component.css'], host: { '[@routeAnimation]': 'true', '[style.position]': "'absolute'", '[style.margin]':"'auto'", '[style.text-align]':"'center'", '[style.width]'

HTML Textarea - cursor starting in center of textarea rather than top

余生颓废 提交于 2019-12-07 04:13:58
问题 I have an HTML template and CSS that renders a textarea field, however when clicking in the field, the cursor starts from half way down the text area, not from the top left as I would expect. This does not occur in IE, but does in Chrome and FF. I also get a list of previous values entered listed below, suggesting that the textbox styles are being applied. Can anyone advise on which CSS proprties I should be looking to modify? Here is the HTML: <input id="description" class="textarea" type=

fontawesome icon not rendering the same in Chrome and Firefox

倖福魔咒の 提交于 2019-12-07 03:38:56
问题 In Chrome/Safari my icon within a bootstrap button looks fine: But in Firefox, the icon drops down a line: I have the fontawesome icon floated right within the <button> . <!--html--> <div class="btn-group btn-group-justified" role="group" aria-label="..."> <div class="btn-group" role="group"> <button type="button" class="btn btn-default btn-small">Cached logs<i class="fa fa-money"></i></button> </div> <div class="btn-group" role="group"> <button type="button" class="btn btn-default btn-small"

IE Compatibility issue: <span> inside <h2>

☆樱花仙子☆ 提交于 2019-12-07 03:27:07
问题 I have the following HTML/CSS, which simply has a <span> tag styled with float:right inside an <h2> tag: <style>h2{background-color:#e2e2e2;} span{float:right;border:1px solid red;}</style> <h2>H2 Test <span>SPAN text</span></h2> Everything works well on Firefox (and I suspect other good browsers, like Chrome, Opera, etc.), but in IE, the <span> gets forced to the next line. Note: the image shows an example of Firefox and IE. How can I get IE to duplicate the behavior of Firefox? Additional

Import html fonts and their style variations?

我们两清 提交于 2019-12-07 03:26:48
问题 I'm implementing google's font named Roboto in my site. I need 2 types : bold and regular . So I checked both types and pressed the download button : But in the downloaded rar file I got ALL the font styles ( also ones which I didn't choose) : Anyway I wanted to test the regular font : ( the fonts are now in my site and not being loaded from google ). (I got those other extensions types (eot,woff,svg) using a font converter (http://www.font2web.com/)) So I did : <style type="text/css"> @font

Button height inconsistency (cross-browser)

痴心易碎 提交于 2019-12-07 03:13:03
问题 I'm having a problem whilst setting the height of a button. Basically I can't manage to have it cross-browser. With Firefox, it is higher than normal , without any reason. Here it's a screenshot (Firefox, Safari and Opera, in this order): And here the code: http://jsfiddle.net/TMUnS/2/ I also tried adding some specific declarations I found on the web, but actually they just reduced the height a bit, but still, they aren't the same (in the same order): And here the code: http://jsfiddle.net