internet explorer - Adding a newline in css -


I am looking for the easiest way to break the collection of inline-blocked devices without resorting to additional markup (e.g. br ).

From the beginning I had thought that excepting the following move that 'four' ends on one line of their own, which I really do not understand.

  & lt; Div class = "inline" & gt; A & lt; / Div & gt; & Lt; Div class = "inline" & gt; Two & lt; / Div & gt; & Lt; Div class = "inline newline" & gt; Three & lt; / Div & gt; & Lt; Div class = "inline" & gt; Four & lt; / Div & gt;          

Regrettably I also need to support IE6!

Attempts with Floats

  .inline {float: left; Width: 50px; Height: 50px; Background: # F00; }. Newwline {Clear: Left; }  
  & lt; Div class = "inline" & gt; A & lt; / Div & gt; & Lt; Div class = "inline" & gt; Two & lt; / Div & gt; & Lt; Div class = "inline newline" & gt; Three & lt; / Div & gt; <6>        

Results in IE6

 screenshot

For IE 6 and other older browsers, you need to add a clear line to use this code:

   

I know that this is not very beautiful but it will work for you.


Comments