cross-browser

Cross-browser CSS for left align and right align on the same line

拈花ヽ惹草 提交于 2019-12-20 02:56:28
问题 Cross-browser CSS that works to allow both left and right align of text on the same line? Example (where each text quote should be aligned as far left or right as possible, respectively): stuff on the right stuff on the left No float's answer's please.. unless there is a way to make the text not break out of the parent div/container in a multicolumn css page... 回答1: With container tags: <div> <p style="float: left">stuff on the left</p> <p style="float: right">Tstuff on the right </p> </div>

font-weight:900 only working in Firefox

故事扮演 提交于 2019-12-20 02:53:26
问题 .bold{ font: 900 20px helvetica; } .bolder{ font: 700 20px helvetica; } I am getting same result for two class except Mozilla Firefox. Can anyone tell me how can I get same result in all browser (Firefox,Chrome,IE,safari,opera) 回答1: It depends on the font. The weight has to be available within the font displayed, or the browser will pick the closest available weight. Helvetica must not have all of those weights embedded within the font file. Read about it more here: https://developer.mozilla

Different rendering from Chrome and Firefox when having floated children in a floated div with no width.

让人想犯罪 __ 提交于 2019-12-20 02:40:08
问题 I've set up a test here http://jsfiddle.net/WZyF7/11/ Firefox seems to differ from Chrome and IE7-9 on how to calculate the width. Instead of giving the content as much width as it needs, it makes the div as wide it's widest child element. This stacks the elements vertically in FF, while horizontally in other browsers. Is there any way to make all browsers handle this the same way without setting a width to the parent element or using JS? And does anyone have information on exactly how this

-moz-background-inline-policy on webkit

一笑奈何 提交于 2019-12-20 02:35:31
问题 Does something like -moz-background-inline-policy exist in Webkit? This property basically gives you the opportunity to specify how should background render for each line of an inline element. I attach to images of the same element on different browsers. This is the result on firefox (with -moz-background-inline-policy: each-box; ) This is on Google Chrome (I've tried -webkit-background-inline-policy , but it seems it doesn't exist) UPDATE Since there is no background policy property on

XMLHttpRequest to read an external file

被刻印的时光 ゝ 提交于 2019-12-20 02:09:12
问题 I want to retrieve the data contained in a text file (from a given URL) through JavaScript (running on the client's browser). So far, I've tried the following approach: var xmlhttp, text; xmlhttp = new XMLHttpRequest(); xmlhttp.open('GET', 'http://www.example.com/file.txt', false); xmlhttp.send(); text = xmlhttp.responseText; But it only works for Firefox. Does anyone have any suggestions to make this work in every browser? Thanks 回答1: IT works using xmlhttp=new ActiveXObject("Microsoft

Cross browser @font-face use

匆匆过客 提交于 2019-12-20 01:58:09
问题 I've been having a lot of difficulties with using custom fonts and @font-face . I'm trying to get a font consistent across the latest versions of Chrome, Safari & Firefox (shown in that order in the screenshot below: I'm using the following to generate this: @font-face { font-family: 'dineng'; src: url('fonts/dineng.eot'); src: url('fonts/dineng.eot?#iefix') format('embedded-opentype'), url('fonts/dineng.woff') format('woff'), url('fonts/dineng.ttf') format('truetype'), url('fonts/dineng.svg

Flex CSS property in <table> doesn't work on IE and Firefox

跟風遠走 提交于 2019-12-19 19:55:57
问题 I'm looking for a solution how to make the Flex property work on a table component across all three browsers (IE, Firefox and Chrome). The following code works only on Chrome (even though -ms- and -webkit- prefixes added): table { background-color: white; } .child { padding: 5px; margin: 5px; background-color: #eee; border: 3px solid; } .container { padding: 2px; background-color: yellow; display: -ms-flexbox; display: -webkit-flex; display: flex; -webkit-flex-direction: row; -ms-flex

Cross browser custom cursor style

二次信任 提交于 2019-12-19 18:58:23
问题 I display a world map by an img tag. I associate an image map with it to hyperlink some regions. I overlay a bordered box div indicating a certain region can be clicked and zoomed. Now to show the user it does this I want the cursor to change to a magnifying glass shape. I looked through the web and found something that works in firefox and ie6-8: #zoomregion:hover { cursor: url('templates/test/styles/images/magnify.cur'), -moz-zoom-in; } Unfortunately opera,chrome and ie9 ignore it and show

Cross browser custom cursor style

心已入冬 提交于 2019-12-19 18:58:17
问题 I display a world map by an img tag. I associate an image map with it to hyperlink some regions. I overlay a bordered box div indicating a certain region can be clicked and zoomed. Now to show the user it does this I want the cursor to change to a magnifying glass shape. I looked through the web and found something that works in firefox and ie6-8: #zoomregion:hover { cursor: url('templates/test/styles/images/magnify.cur'), -moz-zoom-in; } Unfortunately opera,chrome and ie9 ignore it and show

jquery opacity cross browser?

强颜欢笑 提交于 2019-12-19 12:52:14
问题 Is the the jQuery('#selector').css({'opacity':50}); cross browser? The only reason i ask is because the line below that we'd normally use on css -moz-opacity:.50; filter:alpha(opacity=50); opacity:.50; 回答1: this is probably better: $(element).fadeTo(0, 0.5); 回答2: Yes, it sets the css opacity or IE's opacity filter. 回答3: Because jQuery is designed with cross-browser compatibility in mind, as long as the CSS opacity tag is supported in a browser, then, yes, your jQuery code is cross-browser.