Forum Moderators: open
<li>
<a title='Anti Virus blah blah blah' class=body_con href="#">
Anti Virus</a>
</li>
<li>
<SPAN TITLE=”Antivirus blah blah blah” href="#">Antivirus</SPAN>
</li>
<script type="text/javascript">
window.onload=function() { attachBehaviors(); };
//
function attacheBehaviors() {
if (document.getElementById('some-unique-id')) {
document.getElementById('some-unique-id').onclick=function() { return get_link(this.href); };
}
}
//
function get_link(url) {
alert('do something with ' + url);
return false;
}
</script>
I've asked before about a image going into a hover box (still not got it to work)
<a href="#">Your Link Text<span></span></a>
a {position: relative;}
a span {display: none; position: absolute; width: 100px; height: 100px; background: #dad;}
a:hover span {display: block;}
you still struggling with this?
<a href="#">Your Link Text<span></span></a>
a {position: relative;}
a span {display: none; position: absolute; width: 100px; height: 100px; background: #dad;}
a:hover span {display: block;} position: relative is on it.. it might be that it's already already there, if so you don't need to add it again.. you'll know soon enough anyway as the absolute position of the span or image will take the colored box/image up to the top left of the page or container if it's not.. #sitenav #thelistID li a span {} div ul li a {} might target hundreds of <a>'s on the page, as soon as you start entering ID's you start to narrow down which <a>'s can be affected quite dramatically.. the #sitenav one limits it to just the links inside the #sitenav div, if you need to narrow it even further a <ul> ID does it! though like I said the <span> in your code might do it all on it's own if every span in the #sitenav div is to be treated the same!
<li>downloads
<ul>
<li>
<a href="avirusurl">AntiVirus<span>anti virus blah blah blah <img src="imgurl" height="100px" width="100px" ></span></a>
</li>
</ul>
</li>
<li>Affiliates
<ul>
<li>
<a href="pdurl">pd<span>pd blah blah blah <img src="imgurl" height="100px" width="100px" ></span></a>
</li>
</ul>
</li>
a {position: relative;}
a span {display: none; position: absolute; width: 100px; height: 100px; background: #dad;}
a:hover span {display: block;}
a span {display: none; position: absolute; width: 100px; height: 100px; background: #dad;}is dealing with (or is the the whole span (my guess is whole span but learning so confirming :))
#sitenav ul li part before those rules (using whatever the ID of the overall menu container is!), but see the bit in above post about making sure the specificity matches your already existing selectors.. basically as long as they are the same pattern and end with a, a span, a:hover it should be good to go
<li>
<a title='Anti Virus blah blah blah' class=body_con href="#">
Anti Virus</a>
</li>
#sitenav ul li {}
#sitenav a span {
visibility: hidden;
position: absolute;
}
#sitenav a:hover span {
visibility:visible;
color:black;
width: 100px;
background:#FFF;
font-size: 10px;
padding:auto;
}
#sitenav ul li {}
#sitenav a span {
visibility: hidden;
position: relative;
}
#sitenav a:hover span {
visibility:visible;
color:black;
width: 100px;
background:#FFF;
font-size: 10px;
padding:auto;
}
visibility: visible; one, of course lol #sitenav li a span {
visibility: hidden;
position: absolute;
left: 100%;
color:black;
width: 100px;
background:#FFF;
font-size: 10px;
}
#sitenav li a:hover span {
visibility:visible;
}
#sitenav ul#affiliates {}
#affiliates li a span {
visibility: hidden;
position: absolute;
left: -200%; /to make it appear on the left/
color:black;
width: 100px;
background:#FFF;
font-size: 10px;
}
#sitenav ul li {}
#affiliates li a:hover span {
visibility:visible;
}
left: xx; #affiliates li a span {
left: -100%;
}
#sitenav #affiliates li a span {
left: -100%;
}
You're on a roll today! :)
and I make it at LEAST 10 ;)