MarkT Posted March 23, 2014 Share Posted March 23, 2014 Hello, Haven't been the best at CSS, but I've got a website that uses 2 floating elements, with auto adjusting sizes, next to each other. Whats the code to stop the float, for example, an auto height adjusting div, with the floats inside it, it doesn't fill out the div. Is there a code to stop it? I think it's clear or something. Can't remember. Link to comment Share on other sites More sharing options...
Ingolme Posted March 23, 2014 Share Posted March 23, 2014 If the element containing the floated elements has overflow set to "hidden" or "auto" it will expand to take the height of all the elements it contains. Link to comment Share on other sites More sharing options...
davej Posted March 23, 2014 Share Posted March 23, 2014 Also apply clear:both to the next element following the floats. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now