Reputation: 357
I have this JsFiddle: Click here
<div id='menu'>
<ul>
<li><a class='styleanchor' href="${pageContext.request.contextPath}/mainpage/">
hone</a></li><!--
--><li><a class='styleanchor' href="${pageContext.request.contextPath}/verification/user/">asdsad</a></li><!--
--><li><a class='styleanchor' href="${pageContext.request.contextPath}/verification/user/">Replace this LOL</a></li><!--
--><li><a class='styleanchor' href=index.html>Replace this LOL</a></li><!--
--><li><a class='styleanchor' href=index.html>Replace this LOL</a></li><!--
--><li><a class='styleanchor' href="${pageContext.request.contextPath}/verification/store/"></a></li>
</ul>
</div>
What I want to have my border more look like this the border in the image:
As you can see it has an inset border with padding on top and bottom i guess.
How can I achieve those using css? I tried adding padding to li but it didnt work.
Upvotes: 0
Views: 793
Reputation: 2419
If I understand the question here is DEMO
a.styleanchor:hover:before
{
content: "";
position: absolute;
display: inline-block;
width: 0;
height: 0;
line-height: 0;
border: 8px solid transparent;
border-bottom: 8px solid #ffffff;
left: 43%;
right:43%;
bottom: 0;
}
#menu {
text-align: center;
position: relative;
border-bottom: 1px solid gray;
border-top: 1px solid gray;
background: #ffffff; /* Old browsers */
background: -moz-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #ffffff 0%,#e5e5e5 100%); /* IE10+ */
background: linear-gradient(to bottom, #ffffff 0%,#e5e5e5 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */
border-radius: 10px 10px 0px 0px;
}
Upvotes: 1
Reputation: 1797
box-shadow: inset 0 0 5px 5px rgba(0, 0, 0, 0.1), inset 0 3px 2px 5px rgba(0, 0, 0, 0.1);
Upvotes: 0