SVG image link is only clickable on bottom half.

Post about projects that use Inkscape for web design.
holthaunt
Posts: 16
Joined: Sun Feb 18, 2018 7:20 am

SVG image link is only clickable on bottom half.

Postby holthaunt » Fri Jun 15, 2018 8:19 am

I have a SVG logo image used as link on a website page that will only allow clicking on the bottom half of the image. It is the same logo found through out the rest of the site, the only difference is the color, but yet it is the only SVG logo that has this error. I have gone back and copied the orginal SVG, changed the color again, replaced it, still the problem persists. Does anyone know what could cause this? It is the logo on the top left of the page, http://test.holthaunt.com/mennonites/mennonite.html, if want to see for yourself.

Moini
Posts: 2812
Joined: Mon Oct 05, 2015 10:44 am

Re: SVG image link is only clickable on bottom half.

Postby Moini » Sat Jun 16, 2018 12:15 am

I think it could have to do with the text in the file - can you remove it or convert to path and try again? (It's unreadable at that size anyway, I'd suggest removing it, from a design perspective...)

Also, do 'Clean up defs' and 'save as optimized SVG' for use on the web. It's going to be a lot smaller, kb-wise. You can 'Save a copy', to keep your editor data (layers, layer lock etc.) intact.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

holthaunt
Posts: 16
Joined: Sun Feb 18, 2018 7:20 am

Re: SVG image link is only clickable on bottom half.

Postby holthaunt » Sat Jun 16, 2018 5:43 am

Moini, your always great at replying, thanks. I plan on redoing the lettering soon, but for now what is there will have suffice. Although, the question remains, "why just this logo when all the other logos on the other pages work fine". They are all created from the same source, with the only difference being the color of one element in SVG file. I have gone through the code to see if there was some difference, but it seems to be the same as the other pages. I'll go through your other sugestions and see if any of them remedy the issue, then let you know. Thanks, again.

User avatar
Xav
Posts: 1122
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: SVG image link is only clickable on bottom half.

Postby Xav » Sat Jun 16, 2018 5:28 pm

It's nothing to do with the SVG file. The problem is that your "title-txt-2" div is being drawn over the top of it and catching any mouse events. There are a number of ways to fix this, but the simplest is probably to add a "z-index: 1" style to your "logo-div" object.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

holthaunt
Posts: 16
Joined: Sun Feb 18, 2018 7:20 am

Re: SVG image link is only clickable on bottom half.

Postby holthaunt » Sun Jun 17, 2018 11:26 pm

Xav, thanks, the "z-index: 1" did the trick.


Return to “Inkscape & the Web”

Who is online

Users browsing this forum: No registered users and 2 guests