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 trialJi Jiang
2,505 PointsRegarding floating an element
Hi, if I set an element's floating property to "left", will the element be taken out of its normal flow and floated to the left of which container? Its parent container or the left of the viewport? Thank you!
2 Answers
Tommy Gebru
30,164 PointsGood Question! The element should float to the "left" of the parent element. A good example of this would be
<p>
<img src="cinnamon.png" >
This is the text of the paragraph element.
</p>
/*Here an image is set within the paragraph and therefore its value if it had a float property would be within or of the given paragraph either "left, right, none or inherit" the value inherit allows for the image, in this case to follow the same rule as the the parent element which would be the paragraph.*/
Tommy Gebru
30,164 PointsHappy to help!
Ji Jiang
2,505 PointsJi Jiang
2,505 PointsThank you very much! Very helpful!