How to cancel CSS effect in Responsive Website Footer menu?

I have been using this tutorial (http://tympanus.net/codrops/2011/10/24/creative-css3-animation-menus/) to build my footer menu at http://kikidesign.net. It's only for desktop version. I'm trying to edit the footer menu for mobile version and to do so, I tried to cancel the effect in @media.

Desktop version

.ca-menu {
    padding: 0;
    margin: 20px auto;
    width: 100%;
    text-decoration: none;
}
.ca-menu li {
    float: left;
    width: 22.916666667%;
    overflow: hidden;
    position: relative;
    background: none;
    margin-right: 4px;
    text-decoration: none;
    -webkit-transition: all 300ms linear;
    -moz-transition: all 300ms linear;
    -o-transition: all 300ms linear;
    -ms-transition: all 300ms linear;
    transition: all 300ms linear;
}
.ca-menu li:hover {
    z-index:999;  
    -webkit-transform: scale(1.2);  
    -moz-transform: scale(1.2);  
    -ms-transform: scale(1.2);   
    -o-transform: scale(1.2); 
    transform: scale(1.2); 
}
.ca-menu li:hover .aboutimg, .ca-menu li:hover .contactimg, .ca-menu li:hover .downloadimg, .ca-menu li:hover .facebookimg {
    color: #ffffff;
    /**font-size: 30px;**/
    opacity:0.3;
}
.ca-main{
    font-family: 'PrintClearlyRegular';
    font-weight: normal;
    font-style: normal;
    font-size: 1.75em;
    text-align: center;
    padding: 5px 0 0 0;
    text-align: center;
    -webkit-transition: all 200ms linear;
    -moz-transition: all 200ms linear;
    -o-transition: all 200ms linear;
    -ms-transition: all 200ms linear;
    transition: all 200ms linear;
    text-decoration: none;
}
.ca-menu li:hover .ca-main{
    color: #ffffff;
    -webkit-animation: smallToBig 300ms ease;
    -moz-animation: smallToBig 300ms ease;
    -ms-animation: smallToBig 300ms ease;
    font-size: 2.1em;
    padding: 5px 0 0 0; 
    margin: 0;
}
.ca-menu li a{
    text-align: left;
    width: 100%;
    height: 100%;
    display: block;
    position: relative;
    text-decoration: none;
}
@-webkit-keyframes smallToBig{
    from {
        -webkit-transform: scale(0.1);
    }
    to {
        -webkit-transform: scale(1);
    }
}
@-moz-keyframes smallToBig{
    from {
        -moz-transform: scale(0.1);
    }
    to {
        -moz-transform: scale(1);
    }
}
@-ms-keyframes smallToBig{
    from {
        -ms-transform: scale(0.1);
    }
    to {
        -ms-transform: scale(1);
    }
}

mobile version (@media only screen and (max-width: 480px))

.ca-menu li {
    float: left;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: none;
    margin-right: 4px;
    text-decoration: none;
    -webkit-transition: none;
    -moz-transition: none;
    -o-transition: none;
    -ms-transition: none;
    transition: none;
}
.ca-menu li:hover {
    z-index:0;  
    -webkit-transform: none;  
    -moz-transform: none;  
    -ms-transform: none;   
    -o-transform: none; 
    transform: none; 
}
.ca-menu li:hover .aboutimg, .ca-menu li:hover .contactimg, .ca-menu li:hover .downloadimg, .ca-menu li:hover .facebookimg {
    color: #ffffff;
    /**font-size: 30px;**/
    opacity: 1;
}
.ca-main{
    font-family: 'PrintClearlyRegular';
    font-weight: normal;
    font-style: normal;
    font-size: 1.75em;
    text-align: center;
    padding: 5px 0 0 0;
    text-align: center;
    -webkit-transition: none;
    -moz-transition: none;
    -o-transition: none;
    -ms-transition: none;
    transition: none;
    text-decoration: none;
}
.ca-menu li:hover .ca-main{
    color: #ffffff;
    -webkit-animation: none;
    -moz-animation: none;
    -ms-animation: none;
    font-size: 1.75em;
    padding: 5px 0 0 0; 
    margin: 0;
}

However, when I test it out in mobile version, the links keep jumping up. I don't want the links to jump up or anything like that but I couldn't fix it! What do I need to do to fix it?

Answers


The problem is within the .ca-main in the mobile version. You didn't set a "margin: 0", and because it is an H3, it already has a margin. So, when you hover the li, the margin gets removed and you get the "jump" effect. It has nothing to do with transitions or animations.

BTW, you are getting a syntax error in your custom.js line 14.


you can write media query for different screen and give css style for all screen.

example of media query

@media screen and (max-width: 1024px) {
    //your changed code here;
}
@media screen and (max-width: 950px) {
    //your changed style here;
}
@media screen and (max-width: 768px) {
    //your changed style here;
}

different screen size you can find from net or if you want to make dropdown box at any size screen you can referred this link http://tinynav.viljamis.com/


Need Your Help

How do I specify multiple constraints on a generic type in C#?

c# .net oop generics type-constraints

What is the syntax for placing constraints on multiple types? The basic example:

Populate select from server directory PHP jQuery AJAX

php jquery html ajax directory

I have a file structure on my server that looks something like this: