Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

142
Views
Svg to be able to be clicked, and not interfere with the YouTube

I'm having an issue with the svg being over the YouTube.

If you put your mouse over, just off to the right side of the svg and click, the video doesn't open, instead, it takes you back to the previous page.

Clicking on the space in-between the svg, that should open the YouTube video, it doesn't, instead, it takes you back to the previous page.

Everything outside the svg should be YouTube.

Only the area within the red line only should be clickable taking the user to Home

pointer-events: none; would need to be in place, or it interferes with the YouTube video.

The issue with using:

svg.home {
 pointer-events: none;
}

While that works with the svg not interfering, it also disables being able to click on the svg.

How would this be fixed?

I need the svg to be able to be clicked, and not interfere with the YouTube.

https://jsfiddle.net/hwm8qtoz/1/

.home {
  position: absolute;
  top: calc(60% - 25px); /*25px is half the height of the svg*/
  left: 0px;
  width: 50px;
  height: 50px;
  fill: green;
  cursor: pointer;
}

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Because CSS has a box modal and everything is a box. So the entire house is inside a box and the entire box would be clickable or the entire box would not be clickable.

It can be solved in two ways

  1. You can divide your Home SVG into multiple svgs. e.g. 3 parts = (Home Roof + Home Left Side + Home Right Side). Arrange these svgs in such a way that it looks like the house and then make the parent of these SVGs clickable that takes you to previous page.
  2. Create your SVG using multiple paths and make each path individually clickable(taking user to previous page). See this for an idea http://thenewcode.com/696/Using-SVG-as-an-Alternative-To-Imagemaps
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!