1. CSS
  2. Flash
  3. HTML
  4. Illustrator
  5. Java
  6. JavaScript
  7. Maya
  8. Photography
  9. Photoshop
  10. PHP
  11. Ruby
  12. Ruby on Rails
  13. 3ds Max

CSS: A better way to clear floats: Using a clearfloat class.

  1. Clicks today:
    0
  2. Clicks this month:
    0
  3. Overall rating:
    0.00/5

CSS » Tips and Tricks — almost 4 years ago
Today I will show you how to clear a float in CSS, the better way! Suppose you have a container, which has a border, or a background color. Inside of that div you have some text and maybe some images. You want to float the images to the left, however if you do that your elements will be going outside of your container. We will fix that right now!

Comments

Your Comment

You must be logged in to post a comment.