Help with this widget
2 posters
Page 1 of 1
Re: Help with this widget
Hello @Swagbito,
Could you explain the problem and provide any information such as codes that you're having touble with ?
Thanks
Could you explain the problem and provide any information such as codes that you're having touble with ?
Thanks
Re: Help with this widget
Im horrible at coding. And it's supposed to be circles for the images and a hover effect.
Re: Help with this widget
So, you want to round the images, or do you just want the widget like this ?
Re: Help with this widget
Then add the following code to a widget :
You then need to modify the following :
href will be the URL of the user profile. src is the URL of your image, and alt is the image you want to display on hover.
- Code:
<!-- style of the widget -->
<style type="text/css">#mainBlock { height:150px } /* height of the main image block */
#staffList { text-align:center; }
#staffList a img {
border-radius:100px;
width:50px;
height:50px;
}</style>
<!-- the staff list -->
<div id="staffList">
<div id="mainBlock">
<img id="mainImage" src="http://2img.net/i/bl/logo.png" />
</div>
<a href="/u1">
<img src="http://i56.servimg.com/u/f56/18/45/41/65/rose_a10.png" alt="http://i59.servimg.com/u/f59/18/45/41/65/rose_210.png" />
</a>
<br />
<a href="/u2">
<img src="http://i56.servimg.com/u/f56/18/21/60/73/noavaf10.png" alt="http://2img.net/i/fa/admin/icones/help.png" />
</a>
</div>
<!-- technical stuff -->
<script type="text/javascript">(function() {
var img = document.getElementById('staffList').getElementsByTagName('IMG'), main = document.getElementById('mainImage'), def = main.src,i;
for (i=0; i<img.length; i++) {
if (!/mainImage/.test(img[i].id)) {
img[i].onmouseover = function() { main.src = this.alt }
img[i].onmouseout = function() { main.src = def }
}
}
})();</script>
You then need to modify the following :
- Code:
<a href="/u2">
<img src="http://i56.servimg.com/u/f56/18/21/60/73/noavaf10.png" alt="http://2img.net/i/fa/admin/icones/help.png" />
</a>
href will be the URL of the user profile. src is the URL of your image, and alt is the image you want to display on hover.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum