/ Published in: CSS
                    
                                        
In my opinion, this is the best cross-browser method of clearing floated elements in a container. Remember to add .clear-fix{zoom:1;} to an IE specific stylesheet, otherwise IE 7 will complain.
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
.clear-fix:after{clear:both;content:'.';display:block;line-height:0;height:0;visibility:hidden;}
.clear-fix{zoom:1;}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                