[To] IE and Firefox under CSS analytic distinction
Related Tags:
IE: content will be under a high degree of changes, including a high degree of undefined picture, and even high definition, when more than a high degree of content, will use actual height.
Firefox: No high definition, if included in the contents of the content of the image, a high degree of analytical MF is based printing standards, and this will result in highly incompatible with the actual contents of the situation when the definition of a high degree, but more than a high degree of content, content will be beyond the definition of height, but the use of the style of the region will not change, resulting in the wrong style.
Conclusion: We have a high degree of content in certain circumstances the best definition of a high degree, if not high definition, not the best use of frame styles, or styles will certainly be chaos!
Img target alt and title analytic
Alt: When there is no photo or load error tips;
Title: Photos of the tip.
In the case of IE in the absence of a definition of title, as img alt can also use the tip, but in the MF, both in full accordance with the definition contained in the use of standards
Conclusion: Everyone in the definition img object, alt and title will be the final object to write the whole to ensure that all browsers can use normal
Other details difference when you wrote the css, especially the use of float: left (or right) arranged a channeling the picture, will be found in the normal and IE firefox inside there are problems. Whether you use margin: 0, or border: 0 to restrain, 67.49.
In fact, there is another issue here is that the space for IE with firefox is neglected and IE for the block and the spaces between the blocks is dealt with. That is a div immediately after the end of a div writing, a middle round or not spaces. Otherwise there may be problems, such as 3 px deviations, and the reasons for that difficult.
Very lucky that I have encountered such a problem, a number of img tags linked to, and then the definition of float: left, and hope that they can picture link. However, the results in firefox inside normal and IE inside each img are shown between three px. I have the space between labels are not deleted role.
Later, the solution is to set img outside li, li and the definition of margin: 0, this would resolve the IE and the Display bias firefox. IE's explanation for some models will have a lot of mistakes, a lot to be found only reason.
2, nested DIV: DIV father of a high degree of under-DIV not automatically change the solution
<div Id="parent">
<div Id="content"> </ div>
</ Div>
When Content content for a long time, even if the parent has set up a high degree of 100% or auto, in different browsers is not well under the automatic extension. Solutions
<div Id="parent">
<div Id="content"> </ div>
<div Style="font: 0px/0px sans-serif;clear: both;display: block"> </ div>
</ Div>
In the Bottom layer have a high for the spaces, this issue can be lifted
3, CSS DIV Learning Notes
A basically each block must have its own div id to eliminate different functional blocks with the same id / class
Second, each slightly larger than the latter told a block div <! - / Id -> marking the beginning and end
Third, the hidden text and a method TEXT-INDENT:-9999px; LINE-HEIGHT: 0
4, skillfully handling the two tied:
1)
Right as P, Width = 44.5% = left float
Lined up for P.first, border-right: # a7a7a7 1px solid, width = 45%
2)
# Right out right, and margin-left: 50%
# Lined up left, Float = left, width = 50% border-right: # a7a7a7 1px solid
These two methods key point is one option left for the float =
5. Random switching picture:
# Random (
BACKGROUND: url (/ rotate.php);
)
This method is very clever.
4, the highly adaptive on div
Today, small urine Let me help him solve one of the pages, is the high degree of adaptive div, which is in a father-div Yizuoyiyou nested in the two sub-div, and the right of the sub-div content can be extended indefinitely, and can be Father makes the high-div be unlimited drawl, with the general layout, can be correct in IE browser, the Mozilla father in the high-div on fixed at about 10 px, not highly adaptive, height: auto firms not, how to do. A reference to the online information, in order to achieve a high degree of adaptive, div layer must have a float attribute, so I started hands tests
Float: left, then went to div on the page to the left, which can be easily handled, I set it to the outside of a div, to set a good position, then even inside the float: left will not be a mobile location.
Xhtml:
===============
<div Id="container_father">
<div Id="container">
<div Id="panel"> test <br />
Test <br />
Test <br />
<! - Id = "panel" ->
</ Div>
<div Id="sidebar">
<ul>
<li Class="current"> pre-installation check </ li>
<li> PFC reading licensing agreements </ li>
<li> Database initialization </ li>
<li> Complete the installation </ li>
</ Ul>
<! - Id = "sidebar" ->
</ Div>
<! - Id = "container" ->
</ Div>
</ Div>
css
=================
(# Container_father
Margin-left: auto;
Margin-right: auto;
Padding: 0px;
Width: 750px;
)
# Container (
Width: 750px;
Border: 1px solid # cccccc;
Padding: 8px;
Margin: 0px;
Background-color: # F1F3F5;
Float: left;
)
FRom: http://ulean.zg163.net/
5, in-depth standards ~ The IE Doubled Float-Margin Bug (IE double floating Border Bug)
What failure?
No wrong section of the code to a Habitat left floating (float: left) elements placed into a container boxes (box), and floating elements in the use of the Left Border (margin-left) to make it to the left and containers have some distance. Looked pretty simple, right? But until it is in the IE / Win in here so far, in the browser Habitat left floating Element length of the border was mysteriously doubled!
How should the situation?
Below the display emoticons a simple div (brown box) contains a Habitat left floating div (green box). There is a floating element 100 px the left border, and its container boxes between the left edge of a 100 px gap. Up to now, has been good.
. Floatbox (
Float: left;
Width: 150px;
Height: 150px;
Margin: 5px 0 5px 100px;
/ * This last value applies the 100px Left Margin * /
)
Old IE "double occupy"
As is the same code in IE / Win browsing in a slightly different way, the following emoticons demonstrated IE / Win done in the layout.
Why would this happen? Do not ask such a stupid question! This is IE, remember? Meet the standards is the ideal situation, do not expect to achieve, the simple fact is verified.
Focus
This Bug floating border and only when the floating element at the same time in the direction of floating elements and containers between the edge of the box, after which the arbitrary borders have similar elements will not show double floating border. Only specific to the floating of a floating element will encounter this Bug. Habitat left, as the case of the double border the same mysterious displayed on the right of abode in the same manner.
Finally, the repair solution!
Until now (January 04) The Bug has been considered to be beyond repair, often used as a substitute for the wrong border control methods such as: floating a non-visual elements from the left, together with a built-in box with visual Visualization is not installed in the box floating element, or the use of techniques only IE / Win set borders 1 / 2 value. This approach came into effect, but is confused and spoil a clean source code. But now all over.
Steve Clason found a repair method, described in his Guest Demo, repair the double borders and around the text indented Bug. This is a classic Bug repair IE's approach, the use of an attribute to repair impact on the relevant attributes of Bug.
Now how do?
Study it, to put it simply will (display: inline;) is set to float all the necessary elements to do! Yes, it sounds too simple, is not it? But this is really just a display of the "inline" statement to the competent.
Familiar with the Rules of floating elements that automatically set to "block" elements, regardless of what is before them. As Steve pointed out, from the W3C:
9.5.1 Positioning the float: the 'float' property
"This
Property specifies whether a box should float to the left, right, or
Not at all. It may be set for elements that generate boxes that are not
Absolutely positioned. The values of this property have the following
Meanings:
Left
The element generates a block box that is
Floated to the left. Content flows on the right side of the box,
Starting at the top (subject to the 'clear' property). The 'display' is
Ignored, unless it has the value 'none'.
Right
Same as' left ', but content flows on the left side of the box, starting at the top.
None
The box is not floated. "
This shows that the floating element (display:
Inline;) will be ignored, the fact that the browser did not show any change, including IE. However, I do not know why it will allow IE to stop floating elements of the border doubled. As a result, this restoration approach can be applied directly, without any cumbersome method of concealment. If in the future the browser a decision on this restoration approach Baoyang, so long as this restoration into IE alone with the Tan Hack, as details of IE
Three Pixel Text-Jog Demo.
Below are the two used the same code in front of a vivid demonstration, the first open show of IE Bug, the next one pair of floating elements of the use of the "inline" repair.
. Floatbox (
Float: left;
Width: 150px;
Height: 150px;
Margin: 5px 0 5px 100px;
Display: inline;
)
Update (20060828):
6, empty <li> </ li> analytical problems.
Space in the FF <li> </ li> is not to be analytical, that is, <li> labels bring the css style is not to explain. However, in the air IE <li> </ li> is the same as would be analytical.
For example, I Css defined as follows:
# Sidebar ul li (
List-style-type: none;
List-style-image: none;
Margin-bottom: 15px;
)
I use the sidebar to an empty <li> </ li>. Well, the FF is not analytical, and in IE that would occur 15 px gaps.
- IE and FireFox on the CSS summary of the problem of inadequate support
- [To] the IE and Firefox compatible CSS Daquan
- IE FireFox different interpretations of the collection CSS
- CSS font control effects of Thinking
- FIREFOX under IE and the difference between CSS
- CSS used in firefox achieve rectangular fillet
- Using CSS effects produced images
- CSS supports the pull-down menu IE6 IE7 Firefox
- CSS: IE and Firefox features of the CSS-compatible
- IE and Firefox under CSS analytic distinction
- [To] use IE conditions Notes compatible IE, Opera, Firefox + CSS DIV forms the layout By shawl.qiu
- Mozilla Firefox proposed CSS written order
- Div prevent forms or by shoring CSS, to support firefox, to be a reminder
- CSS solution with the difference between IE and Firefox
- Pure CSS support the pull-down menu IE6 IE7 Firefox
- IE and FireFox on the problem of insufficient support for CSS 2 Summary
- Focuses on the IE6, IE7, Firefox how to use CSS hack question!
- [To] IE and Firefox under CSS analytic distinction
- IE and Firefox under CSS, and the distinction between analytic solutions
- CSS generated special effects




