cusimar9
11-23-2006, 07:31 AM
Forgive the repost... but this is a different question really
I'm trying to get a form button and a link button to align next to each other.
For some reason I can get them to align in Firefox but not in IE.
I've finally found something which appears to work, but when I put in the right DOCTYPE it fails to work
This is the (working) code:
<html>
<head>
<title>Testing</title>
<style type="text/css">
p { margin: 10px; }
form button{
cursor: pointer;
margin: 0px 2px 0px 2px; padding: 3px 10px 3px 10px;
text-decoration: none;
text-align: center;
background: #faa;
color: #fff;
border: 1px solid #808080;
font: 11px Tahoma, Arial, Helvetica, sans-serif;
font-weight:bold;
}
a.linkbutton {
margin: 0px 2px -4px 2px; padding: 4px 10px 4px 10px;
height: 24px;
text-decoration: none;
text-align: center;
background: #aaf;
color: #fff;
border: 1px solid #808080;
font: 11px Tahoma, Arial, Helvetica, sans-serif;
font-weight:bold;
}
</style>
</head>
<body>
<form action="">
<table>
<tr>
<td style="width: 300px; background: #ccc;">
<p><button type="submit" id="btn">Test Button</button> <a class="linkbutton" href="javascript:void(0);">Test Link</a></p>
</td>
</tr>
</table>
</form>
</body>
</html>
But when I add the following Doctype, the two buttons no longer align:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
This is the page, complete with doctype, which doesn't work in IE:
http://www.richlyn.co.uk/test.html
It does validate: http://validator.w3.org/check?uri=http://www.richlyn.co.uk/test.html
Any help would be greatly appreciated.
I'm trying to get a form button and a link button to align next to each other.
For some reason I can get them to align in Firefox but not in IE.
I've finally found something which appears to work, but when I put in the right DOCTYPE it fails to work
This is the (working) code:
<html>
<head>
<title>Testing</title>
<style type="text/css">
p { margin: 10px; }
form button{
cursor: pointer;
margin: 0px 2px 0px 2px; padding: 3px 10px 3px 10px;
text-decoration: none;
text-align: center;
background: #faa;
color: #fff;
border: 1px solid #808080;
font: 11px Tahoma, Arial, Helvetica, sans-serif;
font-weight:bold;
}
a.linkbutton {
margin: 0px 2px -4px 2px; padding: 4px 10px 4px 10px;
height: 24px;
text-decoration: none;
text-align: center;
background: #aaf;
color: #fff;
border: 1px solid #808080;
font: 11px Tahoma, Arial, Helvetica, sans-serif;
font-weight:bold;
}
</style>
</head>
<body>
<form action="">
<table>
<tr>
<td style="width: 300px; background: #ccc;">
<p><button type="submit" id="btn">Test Button</button> <a class="linkbutton" href="javascript:void(0);">Test Link</a></p>
</td>
</tr>
</table>
</form>
</body>
</html>
But when I add the following Doctype, the two buttons no longer align:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
This is the page, complete with doctype, which doesn't work in IE:
http://www.richlyn.co.uk/test.html
It does validate: http://validator.w3.org/check?uri=http://www.richlyn.co.uk/test.html
Any help would be greatly appreciated.