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
taahrqqhar
14,147 Pointscan anyone tell me how to add full height to my css bootstrap?
I've tried every way in the world but I cant get it for some reason ... i want each box to be 100% height.... please help. it seams bootstrap dont let you make it 100% height why is that?
1 Answer
Lucas Santos
19,315 PointsWhenever you want to add 100% of height to a child element the parent element also needs to be set to 100%. So in other words if I had a page with 1 div and it was a red box in the middle of the screen and I wanted it to have 100% I would do this.
html,
body {
height: 100%;
}
div {
height: 100%;
width: 200px;
margin: auto;
background: red !important;
}
and a quick note if you ever have trouble overwriting any css just use the !important call. hope this helps.
taahrqqhar
14,147 Pointstaahrqqhar
14,147 PointsI tried this but it didn't work... thank you anyways...