Anyway to get this small piece of code to look the same in FF and IE in quirks mode?
I have the following code:
<html>
<head>
<style type="text/css">
li {list-style-type:none;}
label {clear:left;float:left;width:110px;}
input.submit {display:block;margin:20px 0 10px 110px;padding:4px 0;width:140px; }
</style>
</head>
<body>
<li><label>Full Name: </label><input type="text"></li>
<li><label>E-mail Address: </label><input type="text"></li>
<input type="submit" class="submit" value="Click to continue">
<开发者_运维知识库/body>
</html>
Notice how the "Click to Continue" button lines up in FF but not in IE. I know it's because a doctype is not declared and IE is running in quirks mode. What I'd like to know is if there's a way to line that button up without declaring a doctype and without using an IE-only CSS hack? I know it's an odd question... Thanks!
at first you should put the li
's into an ul
(or remove them, but what you're doing is definitely wrong) - maybe that solves you problem.
This will do it
<html>
<head>
<style type="text/css">
li {list-style-type:none;}
label {clear:left;float:left;width:110px;}
input.submit {display:block;margin:20px 0 10px 110px;padding:4px 0;width:140px; }
ul {margin:0px;padding:0px;}
</style>
</head>
<body>
<ul>
<li><label>Full Name: </label><input type="text"></li>
<li><label>E-mail Address: </label><input type="text"></li>
</ul>
<input type="submit" class="submit" value="Click to continue">
</body>
</html>
精彩评论