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 trialJack Spangenberg
643 PointsCSS skew looks weird.
I have this workspace, https://w.trhou.se/31rqa7n17j I want the line to be white with no color cutoffs and the black continues all the way down the crevis created, how do I fix it?
4 Answers
martinjones1
Front End Web Development Techdegree Graduate 44,819 PointsI believe you just need to update the CSS to that below, making the container relative will allow the white line to be positioned as you wish.
.jumbotron-1 {
background-color: black;
margin-top: 0;
margin-bottom: 0;
position: relative;
}
An absolute element will work it's way up the parent containers looking for the next relative element to figure out where it should be positioned. In this case, it is picking up the body element and that's why it appears at the very bottom of the screen.
Hope this helps.
martinjones1
Front End Web Development Techdegree Graduate 44,819 PointsI'm not sure what you mean sorry, if you have a screenshot or link to something similar that you want to achieve I can try and help further.
Jack Spangenberg
643 PointsLook at the page, On the left side the white line cuts into the blue jumbotron.
I want the black jumbotron's color to come down all the way so the triangle shape created by the skew angle is filled with black.
martinjones1
Front End Web Development Techdegree Graduate 44,819 PointsSo make the white line a thick black line, like below?:
.jumbotron-1::after }
content: '';
display: block;
width: 100%;
height: 100px; // adjust height to suit
position: absolute;
transform: skewY(-2deg);
background-color: #000; // adjust color to suit
bottom: -50px; //should be equal to half of whatever the height is set at
}
Jack Spangenberg
643 PointsI want to get rid of the blue space above the line and make it black space.
martinjones1
Front End Web Development Techdegree Graduate 44,819 PointsIs that a screenshot from the browser and if so what browser? it looks OK to me in Chrome
Jack Spangenberg
643 PointsSorry! It worked. I forgot the height of 100px.
One more thing, I tried to duplicate the process and it messes up on a lower element. Check the workspace link in the OP, the error shows.
Jack Spangenberg
643 PointsJack Spangenberg
643 PointsHow do I make it so the black part goes all the way down on the left side so the line isnt going straight through the blue part.