css issue on hover- shaky effect

Posted by Sarika Thapaliya on Stack Overflow See other posts from Stack Overflow or by Sarika Thapaliya
Published on 2012-08-30T21:36:29Z Indexed on 2012/08/30 21:38 UTC
Read the original article Hit count: 138

Filed under:
|
|
|
|
<style type="text/css">
    .linkcontainer{border-right: solid 0.2px white;margin-right:1px}
    .hardlink{color: #FFF !important; border: 1px solid transparent; }      
    .hardlink:hover{
          background:url("/_layouts/images/bgximg.png") repeat-x -0px -489px;
          display:inline-block; 
          background-color:#21374C;
          border:0.2px solid #5badff; 
          line-height:20px; 
          text-decoration:none !important;} 
</style>

<div style="padding-bottom:3px;background:transparent; color:white!important; float:left; margin-right:20px; line-height:42px;">
    <span class="linkcontainer">
        <a class="hardlink" style="padding:0 10px;" href="http://hronline">HROnline</a>
    </span>
    <span class="linkcontainer">
        <a class="hardlink" style="padding:0 10px; " href="http://hronline/ec">Employee Center</a>
    </span>
    <span class="linkcontainer">
        <a class="hardlink" style="padding:0 10px; " href="http://hronline/businesscommunities">Business Communities</a>
    </span>
    <span class="linkcontainer">
        <a class="hardlink" style="padding:0 10px;" href="http://hronline/internalservices">Internal Services</a>
    </span>
    <span class="linkcontainer">
        <a class="hardlink" style="padding:0 10px;" href="http://hronline/policiesprocedures">Policies&procedures</a>
    </span>
    <span class="linkcontainer">
        <a class="hardlink" style="padding:0 10px;" href="http://hronline/qualitybestpractices">Best Practices</a>
    </span>
</div>

I added a right border to the span that contain menu links. When I hover on each menu links, it also has some background. This is causing jerky effect on the whole container.. What is causing the shaky effect on hover? I don't seem to figure it out--again..

© Stack Overflow or respective owner

Related posts about html

Related posts about css