...

View Full Version : Resolved IE - stupid fiedset alignment



abduraooft
10-25-2009, 03:15 PM
Hi all,

I've two fieldsets inside a form, and applied a simple style
fieldset{
width:96%;
margin:0 auto ;
border:1px solid #ccc;
}
In IE (tested in version 6 and 7), the first filedset is a little aligned to right. Here is the full code ...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>test</title>
<link type="text/css" rel="stylesheet" href="style.css" media="all">
<style type="text/css">

fieldset{
width:96%;
margin:0 auto ;
border:1px solid #ccc;
}
</style>
</head>
<body>
<form method="post" action="" >
<fieldset>
<legend>Account Details</legend>
<ul>
<li>A</li>
</ul>
</fieldset>
<fieldset>
<legend>Personal Details</legend>
<ul>
<li>B</li>
</ul>
</fieldset>
</form>
</body>
</html>


Can anyone point out why and/or a fix (other than drop the width)? :confused:
Any help would be apreciated. :)

coothead
10-25-2009, 03:32 PM
Hi there abduraooft,

I would suggest that you try it like this, instead...


<style type="text/css">
form {
width:96%;
margin:0 auto;
}
fieldset{
border:1px solid #ccc;
}
</style>

coothead

abduraooft
10-25-2009, 03:43 PM
Ah.. thanks. Not waisting any more time for finding the reasons :(

coothead
10-25-2009, 03:50 PM
Hi there abduraooft,

sometimes, it is just impossible to find a logical explanation for IE6's CSS rendition. :D

coothead



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum