Automatically expanding gap in-between navigation buttons - CSS - css

I am making top navigation with CSS. Some of the buttons are floated to the left, and some of them to the right. There is empty gap-button in-between. How to make that gap auto-expandable so the whole top navigation takes 100% of the page?
Here is a link for an example image:
HTML:
<div class="row clearfix">
<div class="top_nav">
<ul>
<li>
<div class="ui-nav-button first">
<a class="button first" href="#"><i class="icon-home"></i></a>
</div>
</li>
<li>
<div class="ui-nav-button">
<a class="button" href="#">About</a>
</div>
</li>
<li>
<div class="ui-nav-button">
<a class="button" href="#">Contact</a>
</div>
</li>
<li>
<div class="ui-nav-button">
<a class="button empty">.</a>
</div>
</li>
<li>
<div class="ui-nav-button">
<a class="button dropdown" href="#">Hi, Michael<i class="icon-sort-down"></i></a>
</div>
</li>
<li>
<div class="ui-nav-button last">
<a class="button logout last" href="#"><i class="icon-off"></i></a>
</div>
</li>
</ul>
</div>
</div>
CSS:
/* Clear fix */
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
.top_nav ul {
list-style: none;
padding: 0;
margin: 0;
}
.top_nav ul li {
display: inline;
}
div[class*="ui"] {
vertical-align: top;
display: -moz-inline-stack;
float: left;
position: relative;
height: 44px;
margin-bottom: 3px;
background-color: #444444;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
zoom: 1;
*display: inline;
}
.top_nav a.button, .top_nav div[class*="ui"] {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
.button {
float: left;
position: relative;
bottom: 3px;
height: 28px;
line-height: 32px;
padding: 8px 30px;
background-color: #f7f7f7;
text-decoration: none;
letter-spacing: 0.1em;
color: #777777;
font-weight: bold;
border-left: 1px solid #cecece;
font-family: sans-serif;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.input:focus {
outline: none;
border-color: #9d9d9d;
}
.button i {
position: relative;
line-height: 23px;
top: 1px;
}
.dropdown_nav {
display: none;
}
/* Set your empty space with */
.button.empty {
width: auto;
text-indent: -9999px;
}
.button.dropdown i {
margin-left: 15px;
margin-right: -15px;
}
.button.first, div[class*="ui"].first {
border: 0px;
-webkit-border-top-left-radius: 3px !important;
-webkit-border-bottom-left-radius: 3px !important;
-moz-border-radius-topleft: 3px !important;
-moz-border-radius-bottomleft: 3px !important;
border-top-left-radius: 3px !important;
border-bottom-left-radius: 3px !important;
}
.button.last, div[class*="ui"].last {
-webkit-border-top-right-radius: 3px !important;
-webkit-border-bottom-right-radius: 3px !important;
-moz-border-radius-topright: 3px !important;
-moz-border-radius-bottomright: 3px !important;
border-top-right-radius: 3px !important;
border-bottom-right-radius: 3px !important;
}
.button.first, .button.last {
padding: 8px 15px;
}
.button[href]:hover {
bottom: 4px;
-webkit-transition-property: top, bottom;
-moz-transition-property: top, bottom;
-o-transition-property: top, bottom;
-ms-transition-property: top, bottom;
transition-property: top, bottom;
-webkit-transition-duration: 0.05s;
-moz-transition-duration: 0.05s;
-o-transition-duration: 0.05s;
-ms-transition-duration: 0.05s;
transition-duration: 0.05s;
}
.button[href]:active {
bottom: 0px;
}
.button i {
font-size: 19px;
}
CSS/HTML link: http://jsfiddle.net/xRCqx/.

Here's the clean code.
HTML:
<div class="row clearfix">
<div class="top_nav">
<ul>
<li>
<div class="ui-nav-button">
<a class="button" href="#">About</a>
</div>
</li>
<li>
<div class="ui-nav-button">
<a class="button" href="#">Contact</a>
</div>
</li>
<li>
<div class="ui-nav-button">
<a class="button dropdown" href="#">Hi, Michael<i class="icon-sort-down"></i></a>
</div>
</li>
</ul>
</div>
</div>
CSS:
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
.top_nav ul {
list-style: none;
padding: 0;
margin: 0;
}
.top_nav ul li {
display: inline;
}
div[class*="ui"] {
vertical-align: top;
display: -moz-inline-stack;
float: left;
position: relative;
height: 44px;
margin-bottom: 3px;
background-color: #444444;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
zoom: 1;
*display: inline;
}
.top_nav a.button, .top_nav div[class*="ui"] {
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
}
.button {
float: left;
position: relative;
bottom: 3px;
height: 28px;
line-height: 32px;
padding: 8px 30px;
background-color: #f7f7f7;
text-decoration: none;
letter-spacing: 0.1em;
color: #777777;
font-weight: bold;
border-left: 1px solid #cecece;
font-family: sans-serif;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.input:focus {
outline: none;
border-color: #9d9d9d;
}
.button i {
position: relative;
line-height: 23px;
top: 1px;
}
.dropdown_nav {
display: none;
}
/* Set your empty space with */
.button.empty {
width: auto;
text-indent: -9999px;
}
.button.dropdown i {
margin-left: 15px;
margin-right: -15px;
}
.button.first, div[class*="ui"].first {
border: 0px;
-webkit-border-top-left-radius: 3px !important;
-webkit-border-bottom-left-radius: 3px !important;
-moz-border-radius-topleft: 3px !important;
-moz-border-radius-bottomleft: 3px !important;
border-top-left-radius: 3px !important;
border-bottom-left-radius: 3px !important;
}
.button.last, div[class*="ui"].last {
-webkit-border-top-right-radius: 3px !important;
-webkit-border-bottom-right-radius: 3px !important;
-moz-border-radius-topright: 3px !important;
-moz-border-radius-bottomright: 3px !important;
border-top-right-radius: 3px !important;
border-bottom-right-radius: 3px !important;
}
.button.first, .button.last {
padding: 8px 15px;
}
.button[href]:hover {
bottom: 4px;
-webkit-transition-property: top, bottom;
-moz-transition-property: top, bottom;
-o-transition-property: top, bottom;
-ms-transition-property: top, bottom;
transition-property: top, bottom;
-webkit-transition-duration: 0.05s;
-moz-transition-duration: 0.05s;
-o-transition-duration: 0.05s;
-ms-transition-duration: 0.05s;
transition-duration: 0.05s;
}
.button[href]:active {
bottom: 0px;
}
.button i {
font-size: 19px;
}

Related

Exclude word from string.Split

I'm new in css and I have pure hamburguer css menu
Problem is the menu is part of page as absolute item, I want it to float and show always when page scroll, the position is just bellow header
Desire result:
And when menu is open take space of page and show an icon at the bottom of menu:
Snippet:
*{
box-sizing: border-box;
}
body{
font-family: 'Montserrat', sans-serif;
margin:0px;
}
.section-title{
color: #2ddf5c;
}
.main-header{
display: flex;
align-items: center;
justify-content: space-evenly;
width:100%;
/* background: #2ddf5c; */
padding: 16px;
}
.main-header > div{
vertical-align: middle;
}
.main-header__brand{
color: #7B8F34;
text-decoration: none;
font-weight: bold;
font-size: 20px;
}
.main-nav__searchbar_container {
display: flex;
width: 100%;
padding: 8px 8px 8px 40px;
overflow: hidden;
vertical-align: middle;
white-space: nowrap;
}
.main-nav__searchbar_container input.main-nav__searchbar{
width:100%;
height: 50px;
/* background: #2b303b; */
border: none;
font-size: 10pt;
float: left;
/* color: #fff; */
padding-left: 15px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.main-nav__searchbar_container input.main-nav__searchbar::-webkit-input-placeholder{
color: #65737e;
}
.main-nav__searchbar_container input.main-nav__searchbar:-moz-placeholder{ /*Frefox 18 */
color: #65737e;
}
.main-nav__searchbar_container input.main-nav__searchbar::-moz-placeholder{/*Frefox 19 */
color: #65737e;
}
.main-nav__searchbar_container input.main-nav__searchbar:-ms-input-placeholder{
color: #65737e;
}
.main-nav__searchbar_container button.icon{
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border: none;
background: #4f5b66;
height: 50px;
width: 50px;
color: #ffffff;
opacity: 0;
font-size: 10pt;
-webkit-transition: all .55s ease;
-moz-transition: all .55s ease;
-ms-transition: all .55s ease;
-o-transition: all .55s ease;
transition: all .55s ease;
}
.main-nav__searchbar_container:hover button.icon,
.main-nav__searchbar_container:active button.icon,
.main-nav__searchbar_container:focus button.icon{
outline: none;
opacity: 1;
margin-left: -50px;
}
.main-nav__searchbar_container:hover button.icon:hover{
background: red;
cursor: pointer;
}
input.main-nav__searchbar:hover{
border: 2px solid #4f5b66;
}
.main-nav__searchbar{
display: flex;
width: 100%;
/* margin: 8px; */
/* padding: 8px; */
border: 2px solid;
border-radius: 4px;
outline: none;
transition: .3s;
}
.main-nav{
display: flex;
width: 100%;
text-align: right;
margin: 0 10px;
}
.main-nav__items{
display: flex;
margin:8px;
padding:8px;
list-style: none;
}
.main-nav__item{
display: inline-block;
}
.main-nav__social{
display:block;
width: 35px;
height: 35px;
margin-left: 10px;
padding: 4px;
}
#main-slider {
width: 100%;
height: 528px;
/* border-radius: 0% 0% 50% 50% / 0% 0% 20% 20%; */
border-bottom-right-radius: 50% 25%;
border-bottom-left-radius: 50% 25%;
position: relative;
}
.badge {
background-color: #fff;
border-radius: 30px;
box-shadow: 0 15px 35px 0 rgba(42,51,83,.12), 0 5px 15px rgba(0,0,0,.06);
position: absolute;
margin-top: 0.5em;
}
.text {
padding: 0.5rem 0.25rem 0.5rem 1rem;
}
.link {
border-radius: inherit;
display: inline-block;
background-color: #7B8F34;
padding: 0.5rem 1rem;
color: #F9F9EC;
}
.slider-wrapper {
display: flex;
justify-content: center;
align-items: flex-end;
}
/* menu */
.main .menu {
clear: both;
/* max-height: 0; */
display: none;
transition: max-height .2s ease-out;
}
/* menu icon */
.main .menu-icon {
cursor: pointer;
float: right;
padding: 28px 20px;
position: relative;
user-select: none;
}
.main .menu-icon .nav-icon {
background: #333;
display: block;
height: 2px;
position: relative;
transition: background .2s ease-out;
width: 18px;
}
.main .menu-icon .nav-icon:before,
.main .menu-icon .nav-icon:after {
background: #333;
content: '';
display: block;
height: 100%;
position: absolute;
transition: all .2s ease-out;
width: 100%;
}
.main .menu-icon .nav-icon:before {
top: 5px;
}
.main .menu-icon .nav-icon:after {
top: -5px;
}
/* menu btn */
.main .menu-btn {
display: none;
}
.main .menu-btn:checked ~ .menu {
/* max-height: 240px; */
display: block;
}
.main .menu-btn:checked ~ .menu-icon .nav-icon {
background: transparent;
}
.main .menu-btn:checked ~ .menu-icon .nav-icon:before {
transform: rotate(-45deg);
top:0;
}
.main .menu-btn:checked ~ .menu-icon .nav-icon:after {
transform: rotate(45deg);
top:0;
}
#media (min-width: 48em) {
.main li a {
padding: 20px 30px;
}
.main .menu {
clear: none;
float: right;
max-height: none;
}
}
<header class="main-header">
<div>
<a href="index.html" class="main-header__brand">
uHost
</a></div><nav class="main-nav">
<div class=main-nav__searchbar_container><input type="text" placeholder="Search" class="main-nav__searchbar">
<button class="icon"><i class="fas fa-search" aria-hidden="true"></i></button>
</div>
<ul class="main-nav__items">
<li class="main-nav__item">
<img class="main-nav__social" src="navbar-icons/social-media__icons/facebook.svg" alt="facebook">
</li>
<li class="main-nav__item">
<img class="main-nav__social" src="navbar-icons/social-media__icons/instagram-bosquejado.svg" alt="instagram">
</li>
</ul>
</nav>
</header>
<div class="main">
<input class="menu-btn" type="checkbox" id="menu-btn" />
<label class="menu-icon" for="menu-btn"><span class="nav-icon"></span></label>
<ul class="menu">
<li>Test1</li>
<li>Test2</li>
<li>Test3</li>
</ul>
</div>
<main>
<section>
<div class="slider-wrapper">
<img id="main-slider" src="https://via.placeholder.com/1365x528?text=Slider">
</div>
</section>
Regards

Smooth hover effect on multi-stages navigation bar in css

I have a multi-stages circles navigation bar in pure css. I want to achieve a hover effect but its not working smoothly. Its very jerky and ugly. How to make it smooth?
Can we also have a effect on hover where blue ball increases from 0 to full width gradually and then a white circle around it appears?
#stages_cont {
margin:50px auto;
width:600px;
}
#stages {
background:#d4d7df;
-moz-border-radius:4px;
-webkit-border-radius:4px;
border-radius:4px;
height:5px;
}
#stages li {
float:left;
text-align:center;
width:33%;
}
#stages li a {
-moz-border-radius:50%;
-webkit-border-radius:50%;
border-radius:50%;
display:block;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
text-decoration:none;
}
.stage_done .stage_circle {
background:#2585fe;
border:6px solid #ffffff;
box-shadow:0px 0px 5px #d4d7df;
height:20px;
width:20px;
margin:-13px auto 10px;
}
.stage_not .stage_circle {
background:#d4d7df;
height:20px;
width:20px;
margin:-8px auto 17px;
-moz-transition:all 0.5s ease;
-webkit-transition:all 0.5s ease;
transition:all 0.5s ease;
}
.stage_done .stage_link {
color:#2585fe;
}
.stage_not .stage_link {
color:#d4d7df;
}
.clr {
clear:both;
}
.stage_not:hover .stage_circle {
background:#2585fe;
border:6px solid #ffffff;
box-shadow:0px 0px 5px #d4d7df;
margin:-13px auto 10px;
}
<link rel="stylesheet" type="text/css" href="https://meyerweb.com/eric/tools/css/reset/reset.css" />
<div id="stages_cont">
<ul id="stages">
<li class="stage_done">
<a class="stage_circle" href="#"></a>
<a class="stage_link" href="#">Details</a>
</li>
<li class="stage_done">
<a class="stage_circle" href="#"></a>
<a class="stage_link" href="#">Content</a>
</li>
<li class="stage_not">
<a class="stage_circle" href="#"></a>
<a class="stage_link" href="#">Send or Schedule</a>
</li>
<div class="clr"></div>
</ul>
</div>
Update the following styles
.stage_not .stage_circle {
background: #d4d7df;
height: 20px;
width: 20px;
margin: -8px auto 17px;
-moz-transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
box-sizing: border-box;
}
.stage_not:hover .stage_circle {
background: #2585fe;
border: 6px solid #ffffff;
box-shadow: 0px 0px 5px #d4d7df;
margin: -13px auto 10px;
box-sizing: border-box;
height: 32px;
width: 32px;
}
#stages_cont {
margin: 50px auto;
width: 600px;
}
#stages {
background: #d4d7df;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;
height: 5px;
}
#stages li {
float: left;
text-align: center;
width: 33%;
}
#stages li a {
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
border-radius: 50%;
display: block;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
text-decoration: none;
}
.stage_done .stage_circle {
background: #2585fe;
border: 6px solid #ffffff;
box-shadow: 0px 0px 5px #d4d7df;
height: 20px;
width: 20px;
margin: -13px auto 10px;
}
.stage_not .stage_circle {
background: #d4d7df;
height: 20px;
width: 20px;
margin: -8px auto 17px;
-moz-transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
box-sizing: border-box;
}
.stage_done .stage_link {
color: #2585fe;
}
.stage_not .stage_link {
color: #d4d7df;
}
.clr {
clear: both;
}
.stage_not:hover .stage_circle {
background: #2585fe;
border: 6px solid #ffffff;
box-shadow: 0px 0px 5px #d4d7df;
margin: -13px auto 10px;
box-sizing: border-box;
height: 32px;
width: 32px;
}
<link rel="stylesheet" type="text/css" href="https://meyerweb.com/eric/tools/css/reset/reset.css" />
<div id="stages_cont">
<ul id="stages">
<li class="stage_done">
<a class="stage_circle" href="#"></a>
<a class="stage_link" href="#">Details</a>
</li>
<li class="stage_done">
<a class="stage_circle" href="#"></a>
<a class="stage_link" href="#">Content</a>
</li>
<li class="stage_not">
<a class="stage_circle" href="#"></a>
<a class="stage_link" href="#">Send or Schedule</a>
</li>
<div class="clr"></div>
</ul>
</div>
Please change the css as on the given snippet
#stages_cont {
margin:50px auto;
width:600px;
}
#stages {
background:#d4d7df;
-moz-border-radius:4px;
-webkit-border-radius:4px;
border-radius:4px;
height:5px;
}
#stages li {
float:left;
text-align:center;
width:33%;
}
#stages li a {
-moz-border-radius:50%;
-webkit-border-radius:50%;
border-radius:50%;
display:block;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
text-decoration:none;
}
.stage_done .stage_circle {
background:#2585fe;
border:6px solid #ffffff;
box-shadow:0px 0px 5px #d4d7df;
height:20px;
width:20px;
margin:-13px auto 10px;
}
.stage_not .stage_circle {
background: #d4d7df;
height: 20px;
text-align: center;
width: 20px;
margin: auto;
/* margin: -8px auto 17px; */
-moz-transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 40px;
}
li.stage_not {
position: relative;
}
.stage_done .stage_link {
color:#2585fe;
}
.stage_not .stage_link {
color:#d4d7df;
}
.clr {
clear:both;
}
.stage_not:hover .stage_circle {
background:#2585fe;
border:6px solid #ffffff;
box-shadow:0px 0px 5px #d4d7df;
}
.stage_not a.stage_link {
padding-top: 29px;
}
<link rel="stylesheet" type="text/css" href="https://meyerweb.com/eric/tools/css/reset/reset.css" />
<div id="stages_cont">
<ul id="stages">
<li class="stage_done">
<a class="stage_circle" href="#"></a>
<a class="stage_link" href="#">Details</a>
</li>
<li class="stage_done">
<a class="stage_circle" href="#"></a>
<a class="stage_link" href="#">Content</a>
</li>
<li class="stage_not">
<a class="stage_circle" href="#"></a>
<a class="stage_link" href="#">Send or Schedule</a>
</li>
<div class="clr"></div>
</ul>
</div>
Cool :)
Add a CSS animation to your hover
.stage_not:hover .stage_circle {
animation-name: example;
animation-duration: 0.5s;
}
#keyframes example {
from {width:0px; border:none;}
to {width:20px; border: 2px solid white;}
}
Clearly this needs some finessing, but a start at least.
https://www.w3schools.com/css/css3_animations.asp
You need to do minor changes in css for smooth experience. Here i am sharing what you need to change.
Add animation to "#stages li" css.
#stages li{
transition: 0.3s ease-in-out all;
}
#stages li a{
border: 6px solid #ffffff;
margin: -13px auto 10px;
}
.stage_not:hover .stage_circle{
background: #2585fe;
box-shadow: 0px 0px 5px #d4d7df;
}
#stages li a + a{
margin-top: 10px;
}

Design chat textbox with rounded border

I have to create the chat application textbox as a below attached image, I have tried but I cannot create the textbox as it was there presented.
.leftpanel-messages {
background-color: #FFFFFF;
padding: 5px 5px 0px 5px;
float: left;
}
.leftpanel-messages ul {
list-style: none;
margin: 0;
padding: 0;
}
.leftpanel-messages ul li {
display:inline-block;
clear: both;
padding: 5px 15px 5px 10px;
border-radius: 10px;
border-bottom-right-radius: 0;
margin-bottom: 2px;
font-family: Helvetica, Arial, sans-serif;
position: relative;
}
.him {
background: transparent;
border:1px solid #eee;
float: left;
}
.him > p {
font-size: 13px;
margin: 0 0 0.2rem 0;
}
.me {
float: right;
background: #0084ff;
color: #fff;
}
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 leftpanel-messages">
<div class="" style="padding:15px 10px 0 10px;">
<ul>
<li class="him">
<p>Text message send by him</p>
<div></div>
</li>
</ul>
</div>
</div>
Can anyone help me to append the right corner at the end of the textbox?
Using :before and :after
.leftpanel-messages {
background-color: #FFFFFF;
padding: 5px 5px 0px 5px;
float: left;
}
.leftpanel-messages ul {
list-style: none;
margin: 0;
padding: 0;
}
.leftpanel-messages ul li {
display:inline-block;
clear: both;
padding: 5px 15px 5px 10px;
border-radius: 10px;
border-bottom-right-radius: 0;
margin-bottom: 2px;
font-family: Helvetica, Arial, sans-serif;
position: relative;
}
.him {
background: transparent;
border:1px solid #eee;
float: left;
position: relative;
}
.him > p {
font-size: 13px;
margin: 0 0 0.2rem 0;
}
.me {
float: right;
background: #0084ff;
color: #fff;
}
.him:before {
width: 0;
height: 0;
border-style: solid;
border-width: 13px 0 0 13px;
border-color: transparent transparent transparent #eee;
position: absolute;
content: '';
bottom: -1px;
right: -12px;
transform: scale(0.7, 1);
}
.him:after {
width: 0;
height: 0;
border-style: solid;
border-width: 12px 0 0 12px;
border-color: transparent transparent transparent #ffffff;
position: absolute;
content: '';
bottom: 0;
right: -10px;
transform: scale(0.7, 1);
}
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 leftpanel-messages">
<div class="" style="padding:15px 10px 0 10px;">
<ul>
<li class="him">
<p>Text message send by him</p>
<div></div>
</li>
</ul>
</div>
</div>
Or you can just use only one pseudo-element :before with background-image with a little triangle.

Styling applied to the wrong place

Please help, I am trying to simply add a border at the last element of my sub menu and text indent for the sub-menu elements, but for some reason it just applies everything on the top of the page, please take a look at the image below, it applies the changes on the top of the page for some reason and not on the elements it self!
for Live preview: http://leo.meeped.co.uk/
Thanks in advance.
Here is the HTML code:
<header>
<div id="wrapperHeader">
<div class="scrollable" id="headerContent">
<section class="headerLogo">
<img id="logoImage" src="assets/elements/logo.png" alt="LOAI Design Studio Logo"/>
</section>
<section id="headerMenu">
<nav id="MainMenu">
<ul class="MainMenu">
<li><a class="active" href="index.html">Home</a></li>
<li><a class="SubMenu" href="#">Portfolio</a>
<ul class="subMenu">
<li>Web Design</li>
<li>Visual Identity</li>
<li>Photography</li>
</ul>
</li>
<li>Testimonials</li>
<li>About Me</li>
<li>Get In Touch</li>
<li><a class="getStartedButton" href="get-started.html">Get Started</a></li>
</ul>
</nav>
</section>
</div>
</div>
</header>
Here's the CSS Code:
body{
line-height: 120%;
}
/*Additions*/
.scrollable{
overflow: auto;
-webkit-transition-property: top, bottom;
transition-property: top, bottom;
-webkit-transition-duration: .2s, .2s;
transition-duration: .2s, .2s;
-webkit-transition-timing-function: linear, linear;
transition-timing-function: linear, linear;
-webkit-overflow-scrolling: touch;
}
/*Pages Overall Styling*/ #Page{
position: relative;
padding-top: 0px;
z-index: 2;
-webkit-box-shadow: -3px 0px 20px rgba(0, 0, 0, 0.25);
-moz-box-shadow: -3px 0px 20px rgba(0, 0, 0, 0.25);
box-shadow: -3px 0px 20px rgba(0, 0, 0, 0.25);
}
/*Content Containers Overall Styling*/.content{
width: 800px;
}
/*Header Containers Overall Styling*/#headerContent{
max-width: 100%;
height: 100%;
position: fixed;
margin: auto;
}
#wrapperHeader{
background-color: #2D3B53;
border-bottom: none;
width: 230px;
height: 100%;
position: fixed;
padding: 0px;
z-index: 1;
}
/*Main Header Elements*/
.headerLogo, #LogoImage{
display: none;
}
#headerMenu{
max-width: 230px;
float: none;
}
/*Main Menu*/
#MainMenu li{
padding: 0px;
float: none;
}
#MainMenu a{
color: #E0E5EE;
border-bottom: 1px solid #253145;
width: 100%;
line-height: 50px;
text-align: left;
text-indent: 20px;
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#MainMenu a:hover{
color: #B8C4D8;
background-color: #3D567B;
}
#MainMenu a.active{
display: none;
}
#MainMenu li a.getStartedButton{
color: #74ADB4;
}
#MainMenu li a.getStartedButton:hover{
background-color: #74ADB4;
color: #D4E6E8;
}
/*SubMenu*/
ul.subMenu{
background-color: #33435F;
border: 1px solid #DDDDDD;
display: none;
padding: 0;
position: relative;
top: 0; left: 0;
-webkit-box-shadow: 0px 4px 15px -5px rgba(0,0,0,0.43);
-moz-box-shadow: 0px 4px 15px -5px rgba(0,0,0,0.43);
box-shadow: 0px 4px 15px -5px rgba(0,0,0,0.43);
}
.subMenu li{
width: 230px;
border-bottom:1px solid #DDDDDD;
}
/*Second Header Container & Elements (Hidden From Widescreen)*/
#SecondHeader{
background-color: #3D5273;
width: 100%;
line-height: 50px;
text-align: left;
display: inline-block;
}
.SecondHeader-button{
color: #FFFFFF;
background: #3D5273 url('../../assets/elements/nav-icon.png') no-repeat 10px center;
font-size: 15px;
font-weight: bold;
text-indent: 45px;
display: inline-block;
}
/*////////////////////////////*/
Use pseudo class :last-child like this:
nav ul li:last-child {
//style
}
Are subMenu and SubMenu the same thing? If so, you need to change that in your HTML. Maybe that's the answer to your problem?

CSS Rounding Works in Safari but not Chrome

I'm having an issue with some CSS I'm working on. The expected content is to be a containing box with four rounded corners that everything falls into. It works in Safari on the Mac, but not in Chrome or in iOS. In those browsers, the corners are squared for the .posttype and the image. I can't seem to figure out what is causing the issue. Any help will be great.
CSS:
.row { margin-bottom: 50px; }
.box { background: #eee; }
.shadow { -moz-box-shadow: 0px 3px 3px 0px #666; -webkit-box-shadow: 0px 3px 3px 0px #666; box-shadow: 0px 3px 3px 0px #666; }
.rounded { border-radius: 10px; -webkit-border-radius: 10px; -moz-border-radius: 10px; display: block; overflow: hidden; }
.posttype {
float: right;
position: relative;
width: 150px;
height: 150px;
text-transform: uppercase;
margin: -85px -85px 4px 4px;
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform:rotate(45deg);
overflow: hidden;
}
.posttype > p {
position: absolute;
bottom: 0;
width: 100%;
text-align: center;
font-size: 24px;
text-shadow: -1px -1px 1px #fff, 1px 1px 1px #000;
color: #fff;
opacity: 0.3;
}
.meta {
width: 110%;
margin: 5px -8px -8px -8px;
padding: 5px;
background-color: rgba(255,255,255,0.8);
box-shadow: inset -5px 1px 5px #555;
font-size: 10pt;
color: #555;
}
.photo { position: relative; }
.photo > p { padding: 0 8px; }
.photo > .meta { padding-left: 16px; padding-bottom: 16px; }
.photo > img, .photo > a > img { width: 100%; margin-bottom: 10px; }
.photo > .posttype { position: absolute; top: 0; right: 0; margin: -75px -75px 4px 4px; }
HTML:
<div class="row">
<div class="span7 box rounded shadow photo">
<img src="photo.jpg" alt="Alt" width="500">
<div class="posttype"><p>photo</p></div>
<p>This is a great picture.</p>
<hr class="clear">
<div class="meta">
<ul>
<li class="date"><i class="icon-time"></i> 7/29/12</li>
<li class="comments"><i class="icon-comment"></i> 3 Comments</li>
</ul>
<hr class="spacer">
<ul class="tags">
<li class="tags"><i class="icon-tags"></i></li>
<li class="tag">Tag1</li>
<li class="tag">Tag2</li>
</ul>
</div>
</div>
</div>
Live demo: Tinkerbin
The round borders are behind the image, add a padding-top look at this http://tinkerbin.com/fLyD5Cuf

Resources