[email protected] Posted October 19, 2014 Share Posted October 19, 2014 Hello . Is it possible the background image to be a link to a page? I know that you can't make a link throught the css background locate. Any ideas? thanks lazaros regards Lazaros Link to comment Share on other sites More sharing options...
♥joli1811 Posted October 19, 2014 Share Posted October 19, 2014 Nice article http://ran.ge/2012/04/03/css-trick-turning-a-background-image-into-a-clickable-link-take-2/ To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
[email protected] Posted October 19, 2014 Author Share Posted October 19, 2014 yes joli nice i read it too but where do i put the "<a href="http://ran.ge/" title="Professional WordPress Development" id="range-logo">Range Web Development</a>" that this article says? regards Lazaros Link to comment Share on other sites More sharing options...
♥joli1811 Posted October 19, 2014 Share Posted October 19, 2014 Going to depend on where you want to place the background image what page where ?? never done myself was just interesting question :D are you talking about the complete site background image? To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
[email protected] Posted October 19, 2014 Author Share Posted October 19, 2014 yes! everywhere from the first page to every product page!!! regards Lazaros Link to comment Share on other sites More sharing options...
♥joli1811 Posted October 19, 2014 Share Posted October 19, 2014 Just playing about body background http://stackoverflow.com/questions/13349677/make-body-background-image-act-as-link <script type="text/javascript"> $('body').on('click', function(e) { if( e.target != this ) return; window.location = 'http://google.com'; }); </script> To improve is to change; to be perfect is to change often. Link to comment Share on other sites More sharing options...
MrPhil Posted October 19, 2014 Share Posted October 19, 2014 yes! everywhere from the first page to every product page!!! Probably a bad idea, then. Presumably you would want foreground links and buttons to take precedence over background links, and I'm not sure how deterministic this method will be. I'm also not fond of methods that use kludges like "shove the image over by 10000 pixels from its container", as they tend to be rather fragile and browser-dependent. Instead of using a background image, have you looked into using a foreground image with normal links (<a> tag), possibly at a different (lower) z-index than other links and buttons? That might be a bit tricky to set up, but should be browser-independent and more reliable than the kludge discussed. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.