wordpress - CSS issue with created triangle and background overlap -


i trying make custom element on wordpress website. 1 of downward pointing triangles leading next page section, has number on top of it.

my problem way have now, number becomes hidden behind background of section above, , can't number/text remain ontop, exacerbated when seen via mobile. changing z-index didn't help.

this css using:

/**to create triangle in middle of page **/

div.arrow-down-tan { width: 0;  height: 0;  border-left: 55px solid transparent; border-right: 55px solid transparent; border-top: 35px solid #f6f6f6; position: relative; left: 50%; margin-left: -55px; margin-top: -3%; padding: 0; z-index: 2; 

}

/**to create text ontop of triangle **/

div.arrow-text {     position: absolute;     left: 50%;     margin-left: -1.25%;     top: -8%;     color: grey;     font-size: 20px;     z-index: 10; 

}

and html using (raw html within wordpress visual composer page section - may part of problem since preceding page section's background covering number):

<div class="arrow-down-tan"></div> <div class="arrow-text">3</div> 

any appreciated. many thanks!

not sure if work in mobile..

https://jsfiddle.net/hastig/n2w9pv08/

css

.d-arrow {     position: absolute;     left: 46%;     width: 0px;     height: 0px;     border-style: solid;     border-width: 40px 30px 0px 30px;     border-color: #cccccc transparent transparent transparent;     /* background-color: red; */ }  .d-arrow-text {     position: relative;      margin: -35px 0px 0px -7px;     padding: 0px 0px 0px 0px;     font-family: tahoma, geneva, sans-serif;     font-weight: bold;     font-size: 20px;      line-height: 20px;     color: #000000;     text-shadow: none; } 

html

<div class="d-arrow">     <div class="d-arrow-text">3</div> </div> 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -