When using bootstrap's card-img-overlay
class, I can't inspect child elements anymore using the chrome devtools. E.g. in the screenshot below, I am not able to select any of the headers anymore.
Am I using the class in a wrong way?
import React from "react"
import Layout from "../components/layout"
import { graphql } from "gatsby"
import SEO from "../components/seo"
import Img from "gatsby-image"
import Card from "react-bootstrap/Card"
import TimeToRead from "../components/time-to-read"
import Tags from "../components/tags"
const SinglePost = ({ data, pageContext }) => {
const { frontmatter } = data.markdownRemark
const { timeToRead } = data.markdownRemark
return (
<Layout pageTitle={frontmatter.title}>
<SEO title={frontmatter.title} />
<Card>
<Img
className="card-image-top"
style={{ maxHeight: "150px" }}
fluid={frontmatter.image.childImageSharp.fluid}
/>
<div className="card-img-overlay">
<Tags tags={frontmatter.tags} />
</div>
<Card.Body>
<Card.Title>{frontmatter.title}</Card.Title>
<Card.Subtitle>
<div className="d-flex justify-content-between">
<span className="text-info">{frontmatter.date}</span>
<TimeToRead minutes={timeToRead} />
</div>
<hr />
</Card.Subtitle>
<Card.Text
dangerouslySetInnerHTML={{ __html: data.markdownRemark.html }}
></Card.Text>
</Card.Body>
</Card>
</Layout>
)
}
pointer-events: none
or there is an element (or pseudo element) that "covers" the elements beneath it.pointer-events: none
made it work.<Card.ImgOverlay style={{ pointerEvents: "none" }}>
. Please add this as answer, so I can accept it.