0

As you can see in the picture below, the whenever I hover over an element in the corner, the element is seeming to over-ride the border and is going over it instead of behind it. I'm assuming that's because of the "box-sizing: border-box;" in the CSS, how would I deal with this problem? Also just a heads up I am using JQuery colors in this JQuery snippet.

Picture (Area of concern: Bottom right of the white highlighted area): http://imgur.com/tHoatO9

Code Incoming

HTML:

<html>
    <head>

    </head>
    <body>
        <div id="header-wrap">
        <div id="nav-container">
            <div id="nav">
                <ul id="start">
                    <li class="menu" id="first"><a href="#">Weblup</a></li>
                </ul>
                <ul id="end">
                    <li class="menu" id="second"><a href="#">Weblup</a></li>
                    <li class="menu"><a href="#">Gallery</a></li>
                    <li class="menu" id="border"><a href="#">Products</a></li>
                    <li class="menu" id="border"><a href="#">Jobs</a></li>
                    <li class="menu" id="border"><a href="#">Contact Us</a></li>
                    <li class="menu" id="border"><a href="#">About Us</a></li>  
                </ul>
                <a href="#" id="pull">Menu</a>
            </div>
        </div>
    </div>
</body>

CSS:

@charset "utf-8";
/* CSS Document */
div#nav-container {
max-width: 1000px;
margin: 0 auto;
font-family: 'Dosis', sans-serif;
}
div#nav {
height: 60px;
width: 100%;
background: rgba(255,255,255,.3);
border: 4px rgb(64,175,39) solid;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
border-top: none;
border-radius: 0 0 10px 10px;
font-size: 15pt;
font-weight: bold;
}
div#nav ul.2nd {
padding: 0;
width: 600px;
height: 56px;   
}
div#nav ul.1st {
padding: 0;
width: 100px;
height: 56px;
display: inline-block;
}
ul#start li {
display: inline-block;
float: left;
}
ul#start li#first { 
height: 56px;
}
ul#end li {
display: inline-block;
float: right;
overflow: hidden;   
}
div#nav a {
color: #fff;
display: inline-block;
width: 100px;
text-align: center;
text-decoration: none;
line-height: 60px;
float: left;
}
div#nav li:nth-child(2) a {
border-right: 0;
}
div#nav a#pull {
display: none;  
}
div#nav li#second {
display: none;  
}
@media screen and (max-width: 670px) {
    div#nav li#second {
        display: block; 
    }
    div#nav li#first {
        display: none;  
    }
    div#nav {
        height: auto;
        border: none
    }
    div#nav ul {
        width: 100%;
        display: block;
        height: auto;
    }
    div#nav li {
        width: 50%;
        float: left;
        position: relative;
        background-color: #455868;
    }
    div#nav li:nth-child(2) a {
        border-right: 1px solid #40af27;
    }
    div#nav li a {
        border-bottom: 1px solid #40af27;
        border-left: 1px solid #40af27;
        border-right: 1px solid #40af27;
        box-sizing: border-box;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
    }
    div#nav a {
        text-align: left;
        width: 100%;
        text-indent: 25px;
        float: left;
    }
}
@media only screen and (max-width : 480px) {
    div#nav li#second {
        display: block;
    }
    div#nav li#first {
        display: none;  
    }
    div#nav {
        border: none;
    }
    div#nav ul {
        display: none;
        height: auto;
    }
    div#nav a#pull {
        display: block;
        background-color: #283744;
        width: 100%;
        position: relative;
    }
    div#nav a#pull:after {
        content:"";
        background: url(../../images/nav-icon.png) no-repeat;
        width: 30px;
        height: 30px;
        display: inline-block;
        position: absolute;
        right: 15px;
        top: 10px;
    }
}
@media only screen and (max-width : 320px) {
    div#nav li#second {
        display: block; 
    }
    div#nav li#first {
        display: none;  
    }
    div#nav li {
        display: block;
        float: none;
        width: 100%;
    }
    div#nav li a {
        border-bottom: 1px solid #576979;
    }
}

JQuery:

$('li.menu')
  .mouseenter(function() {
    $('a', this).animate({color: '#669934'}, {duration: 0, queue: false});
    $(this).animate({backgroundColor: "#fff"}, {duration: 200, queue: false});
  })
  .mouseleave(function() {
    $('a', this).animate({color: "#fff"}, {duration: 0, queue: false});
    $(this).animate({backgroundColor:"rgba(0,0,0,0)"}, {duration: 200, queue: false});
  });

Edited by Bensirpent07

1
Contributor
1
Reply
13
Views
2 Years
Discussion Span
Last Post by Bensirpent07
0

Well I ended up figuring it out, I just gave the inner part an invisible border and gave that border a radius as well until it fit inside of the other border. It fits nicely now.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.