3 px float bug IE6

Discussion in 'CSS' started by Spz, Apr 24, 2010.

  1. #1
    hey, i have 3 floats element, they've 6 px space (3px each), how can i fix it without add another CSS or use "if ie6.."?

    .option1 {
        width:256px;
        float:right;
    	margin-right:27px;
    	display:inline;
        }
    	
    .option2 {
        width:309px;
        float:right;
        }
    	
    .option3 {
        width:170px;
        float:right;
        }
    PHP:
    and the HTML:

        <div class="option1">
            <div class="option_right"></div>
            <div class="option_middle">SOME TEXT YOU KNOW</div>
            <div class="option_left"></div>
    	</div>
    	
        <div class="option2">
            <div class="option_right"></div>
            <div class="option_middle">SOME TEXT YOU KNOW - 2</div>
            <div class="option_left"></div>
    	</div>
    	
        <div class="option3">
            <div class="option_right"></div>
            <div class="option_middle">SOME TEXT YOU KNOW - 3</div>
            <div class="option_left"></div>
    	</div>
    PHP:
    option_left/middle/left dont metter here.

    Thank you!
     
    Spz, Apr 24, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    You can't.
     
    drhowarddrfine, Apr 24, 2010 IP
  3. D79312

    D79312 Peon

    Messages:
    54
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I have had tons of problems with the float of elements...I have problems with padding also...it is a nightmare because I use firefox predominantly and IE6 and other versions suck...
     
    D79312, Apr 24, 2010 IP
  4. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #4
    One good thing about this bug is that you learn plenty about CSS hacks and tricks :D

    If this doesn't work then you may have no choice:
    CSSPlay - IE6 3px Bug Fix

    BTW, I got it from this huge collection of IE6 fixes: :eek:
    Ultimate IE6 Cheatsheet
     
    Cash Nebula, Apr 24, 2010 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    What makes you (the OP) think you have the 3px text jog bug? This code does not cause that bug, and a pragmatic test shows that the bug is not evident.

    To see this bug in glorious color, modify the code as follows:
      .option1 {
        width:256px;
        float:right;
        margin-right:27px;
        display:inline;
        }
       
      .option2 {
        width:309px;
        float:left;
        }
       
      .option3 {
        margin-left: 309px;
        margin-right: 256px;
        }
    ====================
      <div class="option1">
        <div class="option_right"></div>
    
        <div class="option_middle">
          SOME TEXT YOU KNOW
        </div>
    
        <div class="option_left"></div>
      </div>
    
      <div class="option2">
        <div class="option_right"></div>
    
        <div class="option_middle">
          SOME TEXT YOU KNOW - 2
        </div>
    
        <div class="option_left"></div>
      </div>
    
      <div class="option3">
        <div class="option_right"></div>
    
        <div class="option_middle">
          xxx SOME TEXT YOU KNOW - 3
          <br />
          xxx another line of text
        </div>
    
        <div class="option_left"></div>
      </div>
    Code (markup):
    Please describe what you see that you don't want. Since your code renders as it should, I cannot know what you want it to do.

    cheers,

    gary
     
    kk5st, Apr 25, 2010 IP