jQUery ui buttons some issues in IE7

微笑、不失礼 提交于 2019-12-31 05:04:11

问题


I am using jquery UI buttons:

$(document).ready(function() {
    $("a.button, .button, button, input:submit, input:button").button();
})

<p>
    <button type="submit" value="Back">Back</button> &nbsp;&nbsp;<a class="button" id="register">Continue</a>
</p> 

In all browsers the buttons looking perfectly the same , but when i check IE7(switched from IE9 to compatibility mode) the Back button has black border and Continue button moved a couple of pixels down.

here is jsfiddler link http://jsfiddle.net/XJRVt/7/

I also looked at IETester how it is looking in IE6 and it is looking the same like in IE7 :(

May be someone would know how to fix that?


回答1:


Seems like its becasue IE6/IE7 uses a different standard style set for elements. Would proberbly work if you use a CSS Reset or CSS Normalize framework :)

Tried using the Normalize.css (https://github.com/necolas/normalize.css/) and it fixed the float issue atleast.

So its not Jquery UI messing up the layout, its IE!

Try inserting this:

button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }
/*
 * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
 * 2. Correct inner spacing displayed oddly in IE6/7
 */
button, input { line-height: normal; *overflow: visible; }
/*
 * Reintroduce inner spacing in 'table' to avoid overlap and whitespace issues in IE6/7
 */
table button, table input { *overflow: auto; }


来源:https://stackoverflow.com/questions/7354647/jquery-ui-buttons-some-issues-in-ie7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!