Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,860
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1

    Angry IE - stupid fiedset alignment

    Hi all,

    I've two fieldsets inside a form, and applied a simple style
    Code:
    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 ...
    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)?
    Any help would be apreciated.
    Last edited by abduraooft; 10-25-2009 at 03:43 PM.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #2
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,706
    Thanks
    0
    Thanked 236 Times in 231 Posts
    Hi there abduraooft,

    I would suggest that you try it like this, instead...
    Code:
    
    <style type="text/css">
    form {
        width:96%;
        margin:0 auto;
     }
    fieldset{
        border:1px solid #ccc;
    }
    </style>
    
    coothead

  • Users who have thanked coothead for this post:

    abduraooft (10-25-2009)

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,860
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Ah.. thanks. Not waisting any more time for finding the reasons
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,706
    Thanks
    0
    Thanked 236 Times in 231 Posts
    Hi there abduraooft,

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

    coothead


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •