Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Abhishek Neogi
Front End Web Development Techdegree Student 995 Points'float' property just partitions the arrangement between image list items or sections them in columns in a list?
Does it basically spread out the space?
So let's say I wanted 3 columns for my image gallery defined by an unordered list, I'd type:
ul li { float: left; width: 30%; }
And if there are ample images, in whatever amount, it will spread out the images in 3 columns with 10% remnant space which I can use for padding or margins?
Also float: right will arrange stuff from right to left instead of left to right?
Hadi Khalili
7,969 PointsHadi Khalili
7,969 PointsYes it will create 3 columns. Using float direction pushes the element in that direction. Arrangement depends on the order in html file.
You can always try it yourself and see what happens.