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.

rymatech
4,671 Pointsz-line not working? - I am unable to use my scroll box as I believe the profile photo which is partially on it.
z-line not working? - I am unable to use my scroll box as I believe the profile photo which is partially on it. I am trying to create a kind on LinkedIN effect where my round profile photo is half on the cover photo and half on the paragraph box with scroll bar below. Please help? see code below.

rymatech
4,671 Points * {
font-family: sans-serif;
box-sizing: border-box;
}
/* This is the background video ------*/
.fullscreen-bg {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: -100;
}
.fullscreen-bg__video {
position: absolute;
top: 50%;
left: 50%;
width: auto;
height: auto;
min-width: 100%;
min-height: 100%;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
@media (max-width: 767px) {
.fullscreen-bg {
background: url('http://dev2.slicejack.com/fullscreen-video-demo/img/videoframe.jpg') center center / cover no-repeat;
}
.fullscreen-bg__video {
display: none;
}
}
/* The six dividing sections ------ */
html, body {height: 100%; width: 100%; padding: 0%; margin: 0%;}
div {width: 100%; height: 100%;}
#div1 {}
#div2 {
background: #e8e8e8;
margin-bottom: 0;
}
#div3 { background: #304179; }
#div4 { background: #e8e8e8; }
#div5 { background: #d9d9d9 }
#div6 { background: #444; }
/* main elements -------------- */
header {
color: white;
text-align: center;
font-size: 75px;
vertical-align: middle;
padding-top: 20%;
padding-bottom: 0px;
line-height:50px;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #f3f3f3;
}
li {
float: right;
font-size: 20px;
}
li a {
display: block;
color: black;
text-align: center;
padding: 12px 14px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: #ddd;
}
li a.active {
color: black;
background-color: #fee001;
}
/* main classes -------------- */
.mainwording {
color: white;
text-align: center;
border-top: solid #fee001 3px;
margin-left: 23%;
margin-right: 23%;
padding-top: 5px;
font-size: 27px;
}
.lawyer-header {
color: black;
margin-top: 0;
margin-bottom: 10px;
text-align: center;
font-size: 65px;
vertical-align: middle;
padding-top: 20px;
padding-bottom: 0;
}
.second-heading {
margin: 0;
color: #e8e8e8;
text-align: center;
font-size: 75px;
vertical-align: middle;
padding-top: 50px;
padding-bottom: 0px;
line-height:50px;
}
/* IDs ------ */
#logo {
height: 100px;
width: 100px;
margin: 0;
position: fixed;
z-index: +1;
}
#cover-photo1 {
margin-left: auto;
margin-right: auto;
width:800px;
height:200px;
display: block;
margin-bottom: 0;
}
#p-one {
width:800px;
height:255px;
border-style: outset;
text-align: justify;
padding-top: 35px;
padding-left: 15px;
padding-right: 15px;
box-shadow:10px 10px 2.5px #d9d9d9;
background-color: white;
font-size: 15px;
line-height:1.5em;
border:6px;
overflow-y:scroll;
margin-bottom: 0;
margin-top: 0;
display: block;
margin-left: auto;
margin-right: auto;
position: relative;
z-index: -1;
}
#ryan-profile {
height: 150px;
width: 150px;
border-radius: 50%;
border: 4px solid #d9d9d9;
display: block;
top: 50%;
left: 50%;
margin-top: -425px;
margin-left: -100px;
position: relative;
margin-bottom: 0;
}
.profile-pic-class {
position: absolute;
z-index: 999;
}
.cover-photo-class {
position: relative;
z-index: 50;
}
.scroll-box1 {
position: relative;
z-index: 998;
}
</style>
```
2 Answers

Dion Dermott
15,875 PointsHi Ryan,
When I get in a mess with z-index I often find the best thing to do is get rid of all z-index references in the CSS, take it back to square one & work it out from there.
Scroll box working here, by deleting all z-indexes :
Hope this helps,
Dion.

Dion Dermott
15,875 PointsSorry, the link should be https://codepen.io/DeeDee23/pen/f6017c4817254ff955efe74368cabd29
rymatech
4,671 Pointsrymatech
4,671 Points