CSS compatibility between IE and FF browsers-Web Standard tutorialI. Use of important in IE6 and FF. Box1 {width: 150px! Important ;}. Box1 {width: 250px ;}! Important indicates that this setting has a priority and IE has encountered it! Important does not make an error. It only ignores its function. If width is set later, ie uses the last width as the standard. If there are no other settings later, the cur
In a recent project, there is a function point: there is a checkbox on the page that sends a JSONP request to the background when the user chooses or cancels the checkbox. The implementation was for this checkbox to add a onchange event, but the result is unexpected, for this reason, I studied in depth, found that the onchange event in IE and FF under the performance of the following problems.
problem ①: under FF
function Showwin (O1,O2) {
var Mask=document.getelementbyid (O1);
var Popwin=document.getelementbyid (O2);
Document.documentElement.scrollHeight in IE, FF, Chrome is to get the full content of the Web page heightDocument.documentElement.offsetHeight in IE is to obtain the inner surface of the clientheight (that is, a page does not include the printed debug information), in FF, Chrome to get the full content
The FF interpretation of the box model is also different, code description: #test {width:650px!important;width:648px;padding-left:2px;background: #fff;}
Test shows the broadband is 650px
The total width of IE box is: width+padding+border+margin width sum
The total width of the FF box is width, and the width of the padding+border+margin is contained within the widths.
If there are box{width: "300"; PADDING:
Today, adjust the pop-up layer, encountered a small problem: get scrolltop value?
On the Internet to see some of the high way to get the page was rolled, document.body.scrollTop in IE FF is 0, the strange is in Chrome can.
I guess FF to be closer to IE, I used the FF 13.0.1, can be used in the previous version, this skip ...
The code is as follows
Today, when I was in a 52-field report, I was forced to do a thorough research,
I found:
The default value for display at Col under FF is: Table-column
The default value for visibility is: visible
I checked the CSS manual, found that visibility has a collapse optional value, it is said that in IE is not implemented, IE did not achieve Chou FF did not implement, like FF
For more information, see http://netsos.cnblogs.com/1 ,! Important (limited function)
With IE7! Important Support ,! The important method is only compatible with ie6. (note the writing method. Remember that the declaration position must be in advance .)
For example:
# Example {Width: 100px! Important;/* IE7 + FF */Width: 200px;/* IE6 */}
Ii. CSS hack method (for beginners, let's take a look at it and pass it)
The first thing you need to know i
JS Debugging Tools recommended Firefox Firebug plug-ins
Ability to set breakpoints for JS execution
Ability to modify CSS styles while running
View the DOM model, and so on
☆IE8 's own developerbar is also very good
☆ Turn on Firefox all JS warning:Input in the Address bar: About:configDouble-click to set Javascriptoptionrestict to true to see many warnings for error correction
☆ie->firefoxjavascript class
document.all ("id")->document.getelementbyid ("id")And the controls try to use IDs
// Display attributesDisplayPositionFloatClearCursor...
// AttributesMarginPaddingWidthHeight
/* Typographical */Vertical-alignWhite-spaceText-DecorationText-align...
/* Text */ColorFontContent
/* Border backgroundThe reason why boder and background are put at the end is that the modification frequency is more frequent than before, and it is convenient to view them at the end. */BorderBackground}
ProgramCode:
. Class {Background-color: # FFFF00;/* all browsers */* Background-co
. Other compatibility skills
1. Setting padding for Div under FF will increase the width and height, but IE will not. (available! Important solution)2. center problem.1). Vertical center. Set line-height to the same height of the current Div, and then use vertical-align: middle. (Note that do not wrap the content .)2). horizontal center. Margin: 0 auto; (of course not omnipotent)3. To add a style to the content of tag a, set display: block)4. The diff
How do i make IE FF Opera support alpha transparency at the same time? -DIV+CSS Tutorial
The transparent effect of the picture is a special form that needs to be used in the webpage, although not very commonly used, but meet this kind of demand often a bit unprepared.Knowledge about CSS alpha transparency. First, look at the following code:
Filter:alpha (OPACITY=50); /* IE * *-moz-opacity:0.5; /* Moz +
document.documentelement.clientwidth andDocument.documentelement.clientheight.General: Document.body.clientwidth and Document.body.clientheight.6. Adding eventsIe:element.attachevent ("onclick", func);Ff:element.addeventlistener ("Click", Func, True).General: Element.onclick=func. Although you can use the OnClick event, the effect of the onclick and the above two methods is not the same, onclick only executes a process, and attachevent and AddEventListener execute a list of processes, that is,
Div + CSS web page layout is a trend, and I began to adapt to this trend. However, when using Div + CSS website design, we should note that CSS styles are compatible with different browsers, especially for webpages fully designed using Div + CSS, you should pay more attention to the CSS style compatibility of IE6 IE7 ff. Otherwise, Your webpage may be messy! I often get overwhelmed by these things, so I found some information on the Internet, added my
Internet Explorer is replaced by IE, and mozzila FF is replaced by ff.
1. Document. Form. Item Problems
Existing problems:ExistingCodeThere are many statements such as document. formname. Item ("itemname"), which cannot be run in ff.
Solution:Use document. formname. elements ["elementname"]
2. Collection class Object Problems
Existing problems:In the ex
Javascript will inevitably be used for BS development, and each browser has different support for javascript. This requires our programmers to be compatible with their following JavaScript scripts that are compatible with IE and FF (some of them are selected from the Internet and sorted by myself). I hope this will help you. /* Replace Internet Explorer with IE, and replace Mozzila Firefox with MF/FF */
//
Question about ie6.7.8.ff compatibility time: 2010-09-07 Source: Author: Click: a post I read eight times ago. It feels useful, O (∩ _ ∩) o... suitable for cainiao! ~~ For a long time, the source address cannot be found, and friends who know it can post it !~~
As a front-end development engineer, you should note that the most common problem encountered during interface layout is that CSS styles are compatible with different browsers, especially for
When developing Web Front-end, we often use JavaScript to obtain the page height and width. However, the method obtained in different browsers is different, or the method is the same, however, because IE and FF have different implementations of the Web standard, the two browsers in the same method obtain different heights or widths. Next, we will compare the page height and width obtained by JS in IE and FF
The incompatibility of browsers must be terrible. We often just fix it, but forget the more important thing, that is, tracing the root cause to avoid the occurrence of similar incompatibility. I will summarize the following HTML encoding elements:
1.TextThe size is not compatible. It is also the font-size: 14px text. The space occupied by different browsers is different. The actual space occupied by IE is 16 PX, and the space reserved by IE is 3px. The actual height occupied by
The following are the default values of screen Calculation for new ie pages:Ff and IE both support (computing differences) visible area width of the webpage [document. Body. clientwidth]: 1239Ff and IE both support (computing differences) the visible area of the webpage is high [document. Body. clientheight]: 0Ff and IE both support (computing differences) visible area width of the webpage [document. Body. offsetwidth]: 1239Ff and IE both support (computing differences) the visible area of the w
css| Solution | Problem
Resolve IE5/IE5.5/IE6/FF compatibility issues--CSS
Previously found several different versions of the Internet Explorer can run independently, just to try to test the compatibility of the page. Don't try not to know, in IE6 and FF no problem page in IE5 and IE5.5 mess, has been heard that IE5 is a Web standard production of a "nail", now have to believe.
Since there are problems, th
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.