Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of DIV+CSS layout incompatibility between IE and firefox

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the knowledge about "how to solve the problem of incompatibility between DIV+CSS layout in IE and firefox". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

DIV+CSS layout in IE and Firefox

DIV+CSS construction website often appear browser incompatibility problems, the following collated some common incompatibility problems, and solutions!

1, used! important Resolving Layout Differences Between IE and Mozilla

! important is CSS1 on the definition of syntax, the role is to increase the priority of the application of specified style rules, the most important point is: IE has not supported this syntax, and other browsers support it. Therefore, we can use this to define different styles for IE and other browsers. For example, we can define such a style:

.colortest{border:20pxsolid#60A179! important;border:20pxsolid#00F;padding:30px;width:300px;}

When browsing in Mozilla, you can understand! Important priority, so show #60A179 color; browsing in IE, can't understand! Important priority, so show #00F color.

2. Solve the problem that hover style is not displayed after hyperlink access

Change the order of CSS properties: The order criteria should be: a:link-a:visited-a:hover-a:active

3. The method of displaying the content in Li with ellipses after exceeding the length

Web Standard FAQ Web Standard FAQ

4. Margin and padding define abbreviations for size

margin:3px--indicates that all edges are 3px;

margin:3px5px--indicates that the top and bottom values are 3px, and the right and left values are 5px

margin:3px5px7px--indicates that the top value is 3, the right and left values are 5, and the bottom value is 7

margin:3px5px7px5px--Four values in turn represent top,right,bottom,left; top right, bottom left.

5, solve IE can not correctly display transparent PNG--header code added

functioncorrectPNG() { for(vari=0;i

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report