Skip to content

Instantly share code, notes, and snippets.

@Holek
Last active December 12, 2015 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Holek/4712996 to your computer and use it in GitHub Desktop.
Save Holek/4712996 to your computer and use it in GitHub Desktop.
CSS3 Flared Borders (on top)
/** CSS3 Flared Borders (on top)
* adapted from: http://orderedlist.com/blog/articles/flared-borders-with-css/
*/
html {
background:#FFF;
}
* {border: 0; border-collapse: collapse; empty-cells: show; margin: 0; padding: 0}
body {font-size: 62.5%; font-family: Arial, Helvetica, sans-serif}
:link, :visited, :hover, :active, :focus {text-decoration: none}
#topNav {float: left;
-webkit-border-bottom-right-radius: 5px;
-moz-border-radius-bottomright: 5px;
border-bottom-right-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-left-radius: 5px;
background: #5f5f5f;
position: relative;
list-style: none;
padding: 0;
margin: 0;
}
#topNav li {color: white; float: left; line-height: 15px; white-space: nowrap;
position: relative;
}
#topNav li a {color: white; padding: 5px 10px 7px}
#topNav li a:link, #topNav li a:visited {color: white; display: block;}
#topNav li a:hover, #topNav li.active a, #topNav li a:active, #topNav li a:focus {color: white; text-decoration: underline}
#topNav li.separator {border-top: 1px solid #cccccc; padding-top: 5px}
#topNav > li {line-height: 16px}
#topNav > li:first-child {
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-left-radius: 5px;
}
#topNav > li:last-child {
-webkit-border-bottom-right-radius: 5px;
-moz-border-radius-bottomright: 5px;
border-bottom-right-radius: 5px;
}
#topNav:after {
content: '';
position: absolute;
top: 0;
left: 100%;
background-color: #5f5f5f;
width: 5px;
height: 5px;
}
#topNav li:last-child:after {
content: '';
position: absolute;
top: 0;
left: 100%;
background-color: #FFF;
width: 5px;
height: 5px;
z-index: 3;
-webkit-border-top-left-radius: 5px;
-moz-border-radius-topleft: 5px;
border-top-left-radius: 5px;
}
#topNav:before {
content: '';
position: absolute;
top: 0;
left: 100%;
background-color: #5f5f5f;
width: 5px;
height: 5px;
}
#topNav li:first-child:after {
content: '';
position: absolute;
top: 0;
right: 100%;
background-color: #FFF;
width: 5px;
height: 5px;
z-index: 3;
-webkit-border-top-right-radius: 5px;
-moz-border-radius-topright: 5px;
border-top-right-radius: 5px;
}
/* top submenus */
#topNav li:hover {
background-color: #6e6e6e
}
ul#topNav li ul li {
position: relative;
display: block;
float: none;
background-color: #5f5f5f }
#topNav li ul {
display: none;
position: absolute;
margin-left: -1px;
top: 100%;
left: 0; }
#topNav li:hover ul {
display: block; }
<ul id="topNav">
<li><a href="/users/dyJm32nI8r3AyNabxfpGMl" class="" title="My user account ">Demo User</a></li>
<li>
<a href="/companies/cCXVxw2our3AcNabxfpGMl" class="" title="">Demo GmbH</a>
<ul>
<li><a href="/companies/cCXVxw2our3AcNabxfpGMl/show_account" class="" title="">SalesKing Account</a></li>
<li><a href="/companies/cCXVxw2our3AcNabxfpGMl/billing" class="" title="">Upgrade &amp; Order</a></li>
<li class="separator"><a href="/attachments/logo_upload" class="" title="">Company logo</a></li>
<li class="separator"><a href="/companies/new" class="" title="">New Company</a></li>
<li><a href="/companies" class="" title="">My Companies</a></li>
</ul>
</li>
<li>
<a href="/settings/formats_tax_units" class="" title="">Settings</a>
<ul>
<li><a href="/settings/formats_tax_units" class="" title="">Units, tax, date, money</a></li>
<li><a href="/settings/expiry_days" class="" title="">Expiry days</a></li>
<li><a href="/settings/numbering" class="" title="">Number ranges</a></li>
<li><a href="/settings/texts" class="" title="">Default texts</a></li>
<li class="separator"><a href="/users" class="" title="">Users</a></li>
<li><a href="/teams" class="" title="">Teams</a></li>
<li><a href="/roles" class="" title="">Roles</a></li>
<li><a href="/languages" class="" title="">Languages</a></li>
</ul>
</li>
<li><a href="http://demo.salesking.local:3000/logout" class="" title="">Logout</a></li>
<li><a href="http://demo.salesking.local:3000/admin" class="" title="">Administration</a></li>
</ul>
// alert('Hello world!');
{"view":"split","fontsize":"80","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment