Any good way to debug uncleared floats/unclosed divs on page?
These two may become an utter hell, especially when building on existing template, and upon erasing the piece of code mixed with HTML, you discover that page design is ruined. So, are there any tools to tell you, that div is unclosed and float is uncleared (and maybe some more of common HTM开发者_JAVA百科L errors)?
Yes
http://validator.w3.org/
Firebug is excellent and will display broken markup in the console on load. It also has excellent CSS debugging tools, such as the ability to toggle, edit live CSS(add/remove selectors and styles). It is the Swiss-Army Knife of development.
I have upvoted the FireBug and W3 Validator answers.
Another tool I find useful for tracking down unclosed DIVs is the Checker Tool at:
http://www.tormus.com/tools/div_checker
which very quickly shows if and where you may have unmatched DIVs.
精彩评论