I checked ur website but I didn’t find any widgets in it!
By the way are u using any plugins to cache wordpress?
If so the changes u make into your website takes sometime to show up.
<a href="http://www.urbanspirit.co.uk/index.php/reiki/"
<div id='button8706' style='>
height: 100; width: 145;
background: url(button58189594.jpg); background-position: 0px 0px; '
onmouseover = 'document.getElementById("button8706").style.backgroundPosition = "-145px 0px"; '
onmouseout = 'document.getElementById("button8706").style.backgroundPosition = "0px 0px"; '
></div>
</a>
That code is seriously screwed up. It’s not valid HTML. I’m not sure what you’re trying to do, but whatever it is, you’re doing it wrong.
Your initial anchor tag is not closed, the DIV has an unclosed style in it, and overall it’s just a very weird way of trying to do a mouseover image.
My advice: Stop using weird tricks like this. Stick to IMG tags for images. Use preloading instead of shifting backgrounds for mouseover images. And write proper HTML.
No, I’m not using a plug-in to cache wordpress and the widgets are definitely there as they make up my sidebar.
I didn’t write the code and I have also tried uing img tags which is also not working! I used a generator, all I want is an eye-catching button to add to my sidebar to link to a particular page, the html is for a plain blue button with a link.
Maybe it is a widget issue, is there some plug-in that could help with this as I am using the widget that was supplied with the theme.
It is not a widget issue, the issue is that your HTML code is invalid and would never work because it’s not valid.
I don’t know what generator you used, but it sucks. That code can never possibly work.
This might do what you’re wanting, but since I have no idea what you’re wanting, I cannot say for sure:
<a href="http://www.urbanspirit.co.uk/index.php/reiki/">
<div id='button8706'
style='height: 100; width: 145; background: url(button58189594.jpg); background-position: 0px 0px;'
onmouseover='document.getElementById("button8706").style.backgroundPosition="-145px 0px";'
onmouseout='document.getElementById("button8706").style.backgroundPosition="0px 0px";'></div>
</a>
Also, there’s no button58189594.jpg on your server that I can find, so you’ll have to either upload it or change the path of it in the code above for that to work correctly.
Thank you for fixing my code, I am trying to add an html image to my sidebar that links to one of my pages. I have uploaded the image to my images folder of my server, he same one that houses my logo and that shows up so I don’t know why it cannot be seen, I can see it.
Thanks for the tp on changing the path, how do I do that? When I go to my image on the server it has an address shall I use that and if so where? If yes,shall I replace ftp. with http://www.?
Really appreciate this help, thanks.
Try this then:
<a href="http://www.urbanspirit.co.uk/index.php/reiki/">
<div id='button8706'
style='height: 100; width: 145; background: url(http://www.urbanspirit.co.uk/wp-content/themes/jewelrybox-01/images/button58189594.jpg); background-position: 0px 0px;'
onmouseover='document.getElementById("button8706").style.backgroundPosition="-145px 0px";'
onmouseout='document.getElementById("button8706").style.backgroundPosition="0px 0px";'></div>
</a>
Unfortunatlely still no joy! Thanks Otto, I really thought it was going to work!
This code works. I just tested it.
<a href="http://www.urbanspirit.co.uk/index.php/reiki/">
<div id='button8706'
style='height: 100px; width: 145px; background: url(http://www.urbanspirit.co.uk/wp-content/themes/jewelrybox-01/images/button58189594.jpg); background-position: 0px 0px;'
onmouseover='document.getElementById("button8706").style.backgroundPosition="-145px 0px";'
onmouseout='document.getElementById("button8706").style.backgroundPosition="0px 0px";'></div>
</a>
Thanks Otto42, it now works. Much appreciated 🙂