...

View Full Version : float: right with margin-right IE problem



neridaj
07-18-2008, 02:08 AM
Hello,

I have a right floated div containing a form element(button) with a margin right of 100px. This, of course, is not displaying properly in Win IE6. I'm sure this is an easy fix but I don't know what that is, if you do please let me know.

Here is my CSS:



#subscribe
{
float: right;
width: 85px;
margin: 10px 100px 0px 0px;
border: 1px solid red;
}

Here is my HTML:



<div id="subscribe">
<form action="subscribe.php" method="post" accept-charset="utf-8">
<input type="submit" value="Subscribe">
</form>
</div>


Thanks,

Jason

harbingerOTV
07-18-2008, 03:25 AM
#subscribe
{
float: right;
width: 85px;
margin: 10px 100px 0px 0px;
border: 1px solid red;
display: inline;
}


IE6 and below have this cool trick about doubling margins on floats. Adding display:inline should fix that up.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum