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 trialJake Almendarez
Front End Web Development Techdegree Student 4,250 Pointsin the quiz theres margin and the floated element moved up
theres a task on the quiz that ask you to float an element to the right just like the teacher did in the video but he said it didnt move up because of margin. in the quiz it moved up even though that had margin as well. im confused why one did and one didnt.
1 Answer
Steven Parker
231,248 PointsJust having a margin won't prevent a float from working, but it will if the total width of the item plus the margin makes it too wide. The point being made is that a margin is never included in a specified size and is always extra.
Jake Almendarez
Front End Web Development Techdegree Student 4,250 PointsJake Almendarez
Front End Web Development Techdegree Student 4,250 PointsBut in the quiz the element floated right on the margin. Is it because the width was small enough?
Steven Parker
231,248 PointsSteven Parker
231,248 PointsCan you show the specific code, or give a time index in the video where it is shown?