Whats wrong if I use floating element to all html tags?
I'm currently using 'float:left' to all of my tags when slicing. Whats wrong with it?
开发者_开发知识库I think, the pros is I need not to do "clearing hacks" at all.
Sorry for my poor english.
I think by slicing he means starting a new line, it is true that adding float left to everything with the appropiate width will indeed induce a new line, what should happen if something needed to be of a negative margin, or float right, it would break your markup, you should check out your knowledge of tree structure in html, and avoid using floats where not necessary, instead use margins, relative positioning, or absolute, pages designed all in float are hard to appear correct in all major browsers as different broswers treat float irrespectively.
精彩评论