csscss-float

Is there any difference between float: none and clear: none


I was doing a bit of stuff using float and clear. I found no difference using float: none; or clear: none; Is there any? can anybody illustrate the difference with an example


Solution

  • Float:none; tells the elements that you do not wish for it to float.

    Clear tells other elements whether they should be allowed to float or not, and in the case of none, you're allowing floats on both sides. it's why when you use clear:both; that floating stops.