IE8 input css style and align
For testing purpose I have a basic form with three inputs aligned on the same line :
"name"(type=text), "password"(type=text) and "submit"(type=submit)**.
like this:
<body>
<form>
<input type="submit" class="search" value="log in"/>
<input type="text" value="username"/>
<input type="tex开发者_运维百科t" value="username"/>
</form>
</body>
If I go testing in IE8 switching the compatibility-view button i have my form shifting down-right and i noticed also the padding changes even if i apply a reset css like this:
<style>
html, body, span,a, applet, object, iframe, h1, h2, h3, h4, h5,div, h6, p, blockquote, pre, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th,input, td {border: 0 none;margin: 0;padding: 0;
How can someone achieve to have the form steady in the same position ,with all those three inputs aligned and also the padding the same while switching the compatibility-view button?
thanks
Luca
I'm far from an expert with CSS and web page design, but I am currently struggling with updating a web application to look decently in IE 7 after developing and testing primarily with Chrome and IE 8.
I've been using compatibility mode in IE 8 to test page layout in IE 7; from a cursory test with a virtual machine having IE 7 installed on it, compatibility mode renders a page as IE 7 does, and it reports itself to be IE 7.
As far as I can tell, the issue is that IE 7 just renders the input button to be taller than IE 8 does. See an example with no css here: http://jsfiddle.net/zHpX8/4/
If you add a style to explicitly set the input height, then it seems to render the same in both regular mode and compatibility mode: http://jsfiddle.net/zHpX8/6/
Not an ideal answer, and I hope someone with more knowledge will provide a better one as I could use it as well. Currently, for little things like this, I just live with it if it isn't too bad, but for the few cases where I can't find common ground, I have a style sheet specifically for IE 7, and one for all other browsers.
I wish IE 7 would just go away already...
Set a doctype on the html page like this:
<!DOCTYPE html>
as the first line in the html document
found myself an answer giving height and positioning the input type=submit as absolute.. it's a work-around
精彩评论