4

Different position in IE8 and IE 10

 2 years ago
source link: https://www.codesd.com/item/different-position-in-ie8-and-ie-10.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Different position in IE8 and IE 10

advertisements

I have a Problem with the Position of the HTML elements. I am developing a web form.

Until today, I was using IE8 in my Computer (Company issues...) but today I got a new Computer with IE 10.

My problem is that I could see this form perfectly before, but now all elements are moved. For example, the are move 20px more or less to the top, and if I fix it for IE 10, I can't see it in IE 8 correctly.

My question is if the browser interpret in a different way the position:relative tags? And if it is like that, how could I solve it? The users of this form will use IE8 and 10 too...

I already add to my HTML code the tag <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7">

Thanks for all your help!


You can use conditional comments to apply style to specific browsers:

  • gt = greater than
  • lt = less than
  • lte = less than or equal to
  • gte = greater than or equal to

This will target anything greater than IE 8:

<!--[if gt IE 8]>
    <link rel="stylesheet" type="text/css" href="gtie8.css" />
<![endif]-->

This will target anything less than IE 9:

<!--[if lt IE 9]>
    <link rel="stylesheet" type="text/css" href="ltie9.css" />
<![endif]-->

This will target anything that is not internet explorer:

<!--[if !IE]><!-->
    <link rel="stylesheet" type="text/css" href="not-ie.css" />
<!--<![endif]-->

Source: http://www.quirksmode.org/css/condcom.html


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK