No background in the reliance of one unit to another how to fix?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
58 views
that source, how it should look skrinshoter.ru/s/060518/dZdvaQXr?a and that's how it happened to me skrinshoter.ru/s/060518/khaBeiKI?a specially the background highlighted in a different color that was clearly, despite the fact that I made the margin even more, -100 did, the problem is not gone

Accordingly, the code itself
.mainb6 display: flex justify-content: space-around .person .photo z-index: 1 .label background-color: black width: 216px height: 117px text-align: center margin: -30px auto padding: 25px 37px box-sizing: border-box z-index: 2 font-family: Gotham, serif font-weight: 500 .name color: #11749e font-size: 1.25 em line-height: 1.2 .profession color: #000000 font-size: 0.938 em line-height: 1.6


CODE HTML
img
LADY SANSA
Photographer
by | 58 views

2 Answers

0 like 0 dislike
Z-index only works if the specified element position: relative or absolute
class photo z-index you can not give it is completely unnecessary.

width: 216px
height: 117px
such magic numbers are best avoided
by
0 like 0 dislike
Maybe z-index or positioning to use?
that is, the selector with the label to put z-index higher than the selector photo

Although I see what is z-index...

The html code in the Studio with css
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
asked Sep 4, 2019 by barabash2090
0 like 0 dislike
2 answers
asked Aug 7, 2019 by barabash2090
0 like 0 dislike
2 answers
asked Jul 5, 2019 by barabash2090
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users