I have centered these 2 black buttons inside the grey div successfully with flexbox like this image `
#outerDiv{
display: flex;
justify-content: center;
width: 100%;
background: #888; /* Only for demo purposes */
opacity: 0.86;
/* Styles for fixing always at bottom */
position: fixed;
bottom: 0%;
}
#innerDiv{
display: flex;
justify-content: center;
margin: 0 auto;
}
The problem is that I want the black buttons to be clickable but the outer grey div not. Grey div actually prevents me to click the page below (like the "ADD TO CART" white buttons showed in the image or anything under its hitbox).
I think the problem is caused because I set width 100%; display: flex
so I am wondering if there is a solution for centering the black buttons without setting a display: flex div without the div taking full width and preventing me to click or if I can disable the outer div clickability but preserving both the page under that div and the black buttons clickability.
(I have already tried playing with minor z-index
in innerDiv that in outerDiv)
Maybe is useful to let you know that I am using React, Scss and StyledComponents