Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with float:left

Tags:

css

css-float

I have a php page which shows profiles of users from a database.

I have a division of class 'member' for each profile.

If i use float-left for .member class, the content division for the profiles does not expand and profiles are shown outside the container. You can see in the following screenshot.

http://s14.postimage.org/failytjs1/With_Float.png

However, If i don't use float-left for .member class, the content division for the profiles does expand according to the php and profiles are shown inside the container. You can see in the following screenshot.

http://s14.postimage.org/owc6f4axt/Without_Float.png

like image 703
Kanishk Dudeja Avatar asked Aug 08 '26 19:08

Kanishk Dudeja


1 Answers

Add a overflow: hidden; to the parent element of the divs with class 'member'. If the parent element has a height, remove it.

like image 56
scessor Avatar answered Aug 11 '26 09:08

scessor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!