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 trialErick Martinez
2,894 PointsWhat type of elements take up the full width available based on the width of their parent element?
It's not telling me the correct answer and I just wanna know for future reference.
2 Answers
Martin Lecke
14,385 PointsHi
Block elements takes up full width of their parent elements.
eg. <div>
You can also make other inline-elements to block elements with css using a property on that selector. Block on Span etc
display: block:
// example
span {
display: block;
background: red;
}
Abdifatah Mohamed
5,289 PointsBlock elements.
Erick Martinez
2,894 PointsErick Martinez
2,894 PointsThank you!