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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    float: right with margin-right IE problem

    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:

    Code:
    #subscribe
    {
    	float: right;
    	width: 85px;
    	margin: 10px 100px 0px 0px;
    	border: 1px solid red;
    }
    Here is my HTML:

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

    Jason

  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,801
    Thanks
    8
    Thanked 131 Times in 129 Posts
    Code:
    #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.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis


  •  

    Posting Permissions

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