otuatail Posted March 31, 2017 Share Posted March 31, 2017 (edited) Hi I have an outer div and inside I want to have 2 rows of 3 div's. I have made 2 float left and the third (one on the end) clear. How can I have rows of 3 div's each? TIA Desmond. http://whatadrama.desmond-otoole.co.uk/MyAdmin/config.php Edited March 31, 2017 by otuatail Quote Link to comment https://forums.phpfreaks.com/topic/303586-simple-css-float/ Share on other sites More sharing options...
requinix Posted March 31, 2017 Share Posted March 31, 2017 float:clear is not a thing. Float all the DIVs left and give the first of each row, or nth-child(3n+1), a clear:left (which is a thing) so that it won't position itself to the right of any other boxes. And beware the vertical overflow. Quote Link to comment https://forums.phpfreaks.com/topic/303586-simple-css-float/#findComment-1544843 Share on other sites More sharing options...
otuatail Posted March 31, 2017 Author Share Posted March 31, 2017 I have given the first of each row a clear:left but this has made it worse. http://whatadrama.de...dmin/config.php Quote Link to comment https://forums.phpfreaks.com/topic/303586-simple-css-float/#findComment-1544844 Share on other sites More sharing options...
requinix Posted March 31, 2017 Share Posted March 31, 2017 Float all the DIVs left Quote Link to comment https://forums.phpfreaks.com/topic/303586-simple-css-float/#findComment-1544845 Share on other sites More sharing options...
otuatail Posted March 31, 2017 Author Share Posted March 31, 2017 (edited) Okay all inner div's are now float left! Doesn't look right. What was the a clear:left all about? Edited March 31, 2017 by otuatail Quote Link to comment https://forums.phpfreaks.com/topic/303586-simple-css-float/#findComment-1544848 Share on other sites More sharing options...
requinix Posted March 31, 2017 Share Posted March 31, 2017 The first boxes for each row need float:left AND clear:left. Quote Link to comment https://forums.phpfreaks.com/topic/303586-simple-css-float/#findComment-1544849 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.