Table replaced with divs. Works perfectly with Firefox, but bug with IE

Discussion in 'CSS' started by Peanut84, Feb 17, 2006.

  1. #1
    Hi everyone !

    Yesterday I tried to replaced a table which contains a small form with DIVs and I succeeded. It works fine with Firefox, however, there is a bug with MSIE : the left column in the middle part is 28px away from left when it should be at 0px... I "solved" the problem by putting "#left:-28px;". Firefox ignores it, MSIE reads it and puts the column at the good place, BUT that does not respect W3C standards !

    Any help would be greatly appreciated ! I'll write in comments which DIV is not displayed correctly...

    
    <form id="form_aGb7DutNRdm2esNFddFlnLUmvzj4O32l3TzdDjhuk" action="/be7295dbbc75f1b3c9eb4cbc46722d95.php" method="post" style="margin:0px;padding:0px;">
    <div style="position:relative;width:700px;background-color:#005E85;overflow:hidden;margin-left:auto;margin-right:auto;">
    <input name="lIzAGzmmokT7Uku7tkQG8wsYk5aQsJQr8QiKYcJnlbXjrbH7RKqMZ" value="aGb7DutNRdm2esNFddFlnLUmvzj4O32l3TzdDjhuk" type="hidden" />
    	<div style="position:relative;left:0px;top:0px;width:100%;height:28px;background-image:url(/images/formulaires_haut.gif);">
    		<div style="position:absolute;left:0px;top:0px;width:28px;height:28px;background-image:url(/images/formulaires_haut_gauche.gif);z-index:3;">
    		</div>
    
    		<div style="position:absolute;right:0px;top:0px;width:28px;height:28px;background-image:url(/images/formulaires_haut_droite.gif);z-index:3;">
    		</div>
    	</div>
    	<div style="position:relative;">
    <!-- THIS IS THE ONE !!! --->
    		<div style="position:absolute;left:0px;top:0px;width:28px;height:10000px;background-image:url(/images/formulaires_gauche.gif);z-index:2;">
    		</div>
    <!--- END OF THIS IS THE ONE --->
    		<div style="position:absolute;right:0px;top:0px;width:28px;height:10000px;background-image:url(/images/formulaires_droite.gif);z-index:2;">
    		</div>
    		<div style="position:relative;left:0px;right:0px;top:0px;margin-left:28px;margin-right:28px;margin-top:0px;z-index:3;">
    
    			<div class="FML_T">
    				IDENTIFICATION REQUISE
    			</div>
    			<div class="FML_C_T">
    				Nom d&apos;utilisateur
    			</div>
    			<div class="FML_C">
    				<input id="input_6VsML1RbTnqRoNC8Ch6KzEbJ1xLmcLPwfLOWTRNktbxKHHEUTTmwncju8he7" name="6VsML1RbTnqRoNC8Ch6KzEbJ1xLmcLPwfLOWTRNktbxKHHEUTTmwncju8he7" value="" type="text" />
    			</div>
    
    			<div class="FML_C_T">
    				Mot de passe
    			</div>
    			<div class="FML_C">
    				<input id="input_Cdlc4HZylgmhHQ785ck78rQzsDNcJJJJvDRwdXUqxMgspHjLjPr9" name="Cdlc4HZylgmhHQ785ck78rQzsDNcJJJJvDRwdXUqxMgspHjLjPr9" value="" type="password" />
    			</div>
    			<div class="FML_C_S">
    				<input value="Connexion" type="submit" class="FML_Submit" style="margin:0px;" />
    			</div>
    
    		</div>
    	</div>
    	<div style="position:relative;width:100%;height:28px;background-image:url(/images/formulaires_bas.gif);">
    		<div style="position:absolute;left:0px;top:0px;width:28px;height:28px;background-image:url(/images/formulaires_bas_gauche.gif);z-index:3;">
    		</div>
    		<div style="position:absolute;right:0px;top:0px;width:28px;height:28px;background-image:url(/images/formulaires_bas_droite.gif);z-index:3;">
    		</div>
    	</div>
    </div>
    
    Code (markup):
    Have a look at the following file... it shows the correct display in FFox, and the wrong one in MSIE.

    Thanks for your help, really appreciate it :)
     

    Attached Files:

    Peanut84, Feb 17, 2006 IP
  2. nOR

    nOR Peon

    Messages:
    281
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Im not too advanced in CSS but maybe a margin-left:0px; could work.
     
    nOR, Feb 19, 2006 IP