Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Andre Kucharzyk
4,479 PointsDrop cap - question about display type.
Normally when you set an element to be display: block, it prevents anything else sticking to it, meaning, another element will be in the next line. Why its not the case in this example?
2 Answers

Rachel Campbell
9,103 PointsCan you copy and paste the code here? It's been a little while since I watched the video, but I believe there is a float property attached to the drop cap. So, with float, it's taken out of the regular document flow.

Andre Kucharzyk
4,479 PointsYes, you are right - there is float property, but why use the block property too?
.dropcap { font-size: 5.4em; display: block; float: left; width: .8em; height: .7em; line-height: 0.8; margin: 0; }

Emmanuel Molina
9,268 PointsAs far as I understand the display: block;
isn't needed. Try to delete it and watch the result.
In fact I don't even understand why he uses a class to select the first letter of the first word of the first paragraph of a section and not uses section p:first-of-type:first-letter