CSS Questions

Hi All,

Post CSS Questions of any.

it will help who facing Interviews.

Thank you.

  1. What Clearleft will do?
  2. How to target IE ?

The property clear with a value of left will clear the element from any floats before it that have a value of left, for instance see the below examples.

Non-cleared element
Cleared element

So in the two example links above you will see the first example without clear: left on the #clear-me element that it just flows inline with the #float-me element. As soon as the clear property is applied it restores the DOM flow so other elements don’t follow the incorrect flow.

There are a few ways to target IE, no one developer has more then one way they like doing IE specific CSS and me for example i like using conditional statements in the HTML on <html> tag that allow for class driven IE CSS but there are other ways to achieve the same result.