I wanted to add a flashing "Contact Us" button to the menu bar of my website to immediately attract people's attention when they visit. Here is the javascript code I used:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function blinker()
{
document.getElementById("btnBlink").style.backgroundColor="red";
setTimeout("document.getElementById('btnBlink').style.backgroundColor=''", 500);
setTimeout("blinker()",1500);
}
window.onload=blinker;
</script>
And here is the HTML code I used:
<li id="menu-item-1639" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1639"><a href="http://WebsiteNameGoesHere.com/contact-us/"><input type="button" value="Contact Us" id="btnBlink" /></a></li>
While I successfully made the button blink red, it appears misaligned in the menu bar. It sits higher than the other links and I want to adjust its position to be lower.