August 3, 201214 yr if I had a weak point in my overall css knowledge Id have to admit it was floats has anyone got any recommendations how I can master this particular facet of web design? ie stuff that worked for you Any help appreciated Pottsy
August 3, 201214 yr There are three basic situations with floats:- 1. Where you just want to float an element inside another and have text wrap around the floated element See item 2 here http://www.wickham43.net/divboxes.php 2. Several floated elements side by side See item 3 here http://www.wickham43.net/divboxes.php 3. One or more floated elements inside a container and you want the container background to cover the floated element(s). See examples of background situations here http://www.wickham43...xbackground.php Item 2d is a favorite method of clearing floats to make the background show down to the bottom of the floated divs and to stop the following element from showing too high up (floated elements don't give their height to the container so the following element will appear too high unless you clear the floats). Edited August 3, 201214 yr by Wickham
August 7, 201214 yr Just remember to clear them when you need to I don't remember the last time I cleared a float
August 7, 201214 yr How do you get on in life without clearing floats? With floats I find you just have to understand exactly how they work/what they do rather than just seeing the effect making an element float has. That way you can use them more efficiently.
Create an account or sign in to comment