Material sidenav margin issue - css

I'm a backend developer helping someone with an Angular webapplication and I ran into an issue when adding the fonts of our company, he uses material.
The red part is a mat-sidenav block and the blue is mat-sidenav-content the yellow part is some margin that suddenly is that big when I changed the fonts.
In devtools it looks like this:
so there is somewhere an element.style setting the margin but can't seem to find it in the code. Now the strange thing is if I dragged the tab out of chrome as a seperate window the issue is resolved but I don't think users will like doing that. Any clue why the margin changes and how I can resolve this permanently?
/* VAriables */
:root {
--color-accent: black; /* Fallback */
}
.u-category-test { --color-accent: rgba(67, 119, 64, 0.5); }
.u-category-qa { --color-accent: rgba(153, 100, 19, 0.5); }
.u-category-prod { --color-accent: rgba(216, 3, 3, 0.5); }
/* Nav */
.nav-header {
position: relative;
padding: 2rem;
}
.nav-title {
text-transform: uppercase;
font-weight: 300;
line-height: 1;
margin: 0;
}
.nav-title strong {
font-weight: 600;
}
.nav-header-icon {
position: absolute;
width: 36px;
height: 36px;
top: 1.5rem; /* magic */
right: 1.75rem; /* magic */
}
.nav-item {
padding: .5em 0.5em 0.5em 0;
}
.nav-icon {
width: 16px;
height: 16px;
vertical-align: top;
margin-right: .25rem;
}
.nav-category {
margin: .2em 0;
padding-left: 2rem;
font-size: 11px;
font-weight: normal;
text-transform: uppercase;
}
.nav-button {
display: block;
width: 100%;
padding: .2rem;
padding-left: calc(2rem + 16px + .5rem); /* padding + icon + magic */
line-height: 2;
text-align: left;
font: inherit;
font-size: 13px;
color: inherit;
border: none;
background-color: transparent;
cursor: default;
outline: none;
}
.nav-button:hover,
.nav-button:focus:not(.is-selected) {
background-color: hsla(0,0%,0%,.1);
}
.nav-button.is-selected {
background-color: var(--color-accent);
}
.nav-button.is-selected,
.nav-button.is-selected em {
color: #fff;
}
.nav-button.is-selected:focus {
opacity: .8;
}
.nav-button em {
font-style: normal;
font-weight: 600;
pointer-events: none; /* makes it invisible to clicks */
}
.nav-footer {
margin-top: 1rem;
padding: 2rem;
border-top: 1px solid var(--color-border);
text-align: center;
}
.nav-footer-version {
display: block;
width: 100%;
padding: 0;
margin-bottom: .75rem;
line-height: 2;
text-align: left;
font: inherit;
font-size: 13px;
color: inherit;
border: none;
background-color: transparent;
cursor: default;
outline: none;
text-align: center;
}
#button-download {
background-color: rgba(196, 196, 196, 0.5);
}
#button-download:hover {
background-color: rgba(150, 150, 150, 0.5);
}
.client-container {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: #eee;
}
.main {
height: 100%;
}
<header class="nav-header">
<h1 class="nav-title">Clients</h1>
</header>
<div class="nav-item">
<h5 class="nav-category">
<span class="nav-icon flag-icon flag-icon-be"></span>
Client
</h5>
<button type="button" class="u-category-test nav-button" id="button-test" routerLink="test" routerLinkActive="is-selected">Dev</button>
<button type="button" class="u-category-qa nav-button" id="button-qa" routerLink="qa" routerLinkActive="is-selected">QA</button>
<button type="button" class="u-category-prod nav-button" id="button-prod" routerLink="prod" routerLinkActive="is-selected">Production</button>
</div>
.client-container {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: #eee;
}
.main {
height: 100%;
}
#font-face {
font-family: 'Custom';
src: url('/assets/fonts/Custom.ttf') format('truetype');
}
* {
box-sizing: border-box;
}
html {
height: 100%;
font-family: 'Custom', 'BlinkMacSystemFont', 'Lucida Grande', 'Segoe UI', Ubuntu, Cantarell, sans-serif;
font-size: 14px;
line-height: 1.5;
overflow: hidden; /* Prevents rubber-band scrolling of the whole "page" */
color: var(--color);
background-color: #fff; /* To cover OSes with no default background color */
}
body {
margin: 0;
height: 100%;
display: flex;
}
h1,
h2,
h3 {
margin-top: 0;
line-height: 1.5;
}
h1 {
font-family: 'Custom';
font-size: 48px;
font-weight: normal;
}
h2 {
font-family: 'Custom';
font-weight: normal;
letter-spacing: -1px;
font-size: 16px;
}
h3, h4 {
font-family: 'Custom';
font-weight: normal;
font-size: 16px;
text-transform: uppercase;
}
h5{
font-family: 'Custom';
font-weight: normal;
font-size: 30px;
}
table {
width: 100%;
border-spacing: 0;
border: 1px solid hsla(0,0%,0%,.08);
border-width: 0 1px 1px 0;
}
th {
background-color: hsla(0,0%,50%,.06);
}
th,
td {
text-align: center;
border: 1px solid hsla(0,0%,0%,.08);
border-width: 1px 0 0 1px;
}
div.main{
padding: 30px;
button{
font-family: 'Custom';
margin: 10px;
}
button:hover{
background-color: transparent;
color:black;
}
}
<mat-sidenav-container class="client-container">
<mat-sidenav mode="side" opened><app-side-nav></app-side-nav></mat-sidenav>
<mat-sidenav-content>
<div class="main mat-app-background">
<router-outlet></router-outlet>
</div>
</mat-sidenav-content>
</mat-sidenav-container>

What helped me was applying position: unset to mat-sidenav-container. This element by default has position: relative.
Interestingly I had this problem only with multiple sidenavs.
<mat-sidenav-container>
<mat-sidenav mode="side" position="start" opened>
<desktop-main-navigation></desktop-main-navigation>
</mat-sidenav>
<mat-sidenav-content>
<router-outlet></router-outlet>
</mat-sidenav-content>
<mat-sidenav mode="over" position="end">
Notifications
</mat-sidenav>
</mat-sidenav-container>
Your specific issue and fact it happened when adding fonts might has been explained here:
https://stackoverflow.com/a/56219106/2804285

Related

Lost container width throughout site

* Skeleton V2.0.4
* Copyright 2014, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 12/29/2014
*/
/* Grid
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.container {
position: relative;
width: 100%;
max-width: 960px;
margin: 0 auto;
padding: 0 20px;
box-sizing: border-box; }
.column,
.columns {
width: 100%;
float: left;
box-sizing: border-box; }
/* For devices larger than 400px */
#media (min-width: 400px) {
.container {
width: 85%;
padding: 0; }
}
/* For devices larger than 550px */
#media (min-width: 550px) {
.container {
width: 90%; }
.column,
.columns {
margin-left: 4%; }
.column:first-child,
.columns:first-child {
margin-left: 0; }
.one.column,
.one.columns { width: 4.66666666667%; }
.two.columns { width: 13.3333333333%; }
.three.columns { width: 22%; }
.four.columns { width: 30.6666666667%; }
.five.columns { width: 39.3333333333%; }
.six.columns { width: 48%; }
.seven.columns { width: 56.6666666667%; }
.eight.columns { width: 65.3333333333%; }
.nine.columns { width: 74.0%; }
.ten.columns { width: 82.6666666667%; }
.eleven.columns { width: 91.3333333333%; }
.twelve.columns { width: 100%; margin-left: 0; }
.one-third.column { width: 30.6666666667%; }
.two-thirds.column { width: 65.3333333333%; }
.one-half.column { width: 48%; }
/* Offsets */
.offset-by-one.column,
.offset-by-one.columns { margin-left: 8.66666666667%; }
.offset-by-two.column,
.offset-by-two.columns { margin-left: 17.3333333333%; }
.offset-by-three.column,
.offset-by-three.columns { margin-left: 26%; }
.offset-by-four.column,
.offset-by-four.columns { margin-left: 34.6666666667%; }
.offset-by-five.column,
.offset-by-five.columns { margin-left: 43.3333333333%; }
.offset-by-six.column,
.offset-by-six.columns { margin-left: 52%; }
.offset-by-seven.column,
.offset-by-seven.columns { margin-left: 60.6666666667%; }
.offset-by-eight.column,
.offset-by-eight.columns { margin-left: 69.3333333333%; }
.offset-by-nine.column,
.offset-by-nine.columns { margin-left: 78.0%; }
.offset-by-ten.column,
.offset-by-ten.columns { margin-left: 86.6666666667%; }
.offset-by-eleven.column,
.offset-by-eleven.columns { margin-left: 95.3333333333%; }
.offset-by-one-third.column,
.offset-by-one-third.columns { margin-left: 34.6666666667%; }
.offset-by-two-thirds.column,
.offset-by-two-thirds.columns { margin-left: 69.3333333333%; }
.offset-by-one-half.column,
.offset-by-one-half.columns { margin-left: 52%; }
}
/* Base Styles */
/* NOTE
html is set to 62.5% so that all the REM measurements throughout Skeleton
are based on 10px sizing. So basically 1.5rem = 15px :) */
html {
font-size: 62.5%; }
body {
font-size: 1.5rem;
line-height: 1.6;
font-weight: 400;
font-family: 'Roboto', sans-serif;
color: rgba(0,0,0,.7);
}
.header{
text-align: left;
}
.header img{
margin-top: 5%;
}
.header img a{
text-decoration: none;
}
.header p{
font-size: 9rem;
font-weight: 700;
line-height: 8.5rem;
font-family: 'roboto', monospace;
}
.home-feature-container{
padding: 2% 4% 6% 0;
}
.home-feature-container-onecolumn{
padding: 4% 0% 4% 0;
}
.home-feature-container img{
max-width: 100%;
}
.home-feature-container-onecolumn img{
max-width: 100%;
}
.header a{
color: #fed230;
font-weight: 700;
text-decoration: none;
}
.story-title{
text-transform:uppercase;
font-size: 4rem;
font-weight:400;
line-height: 1.2;
letter-spacing: 0rem;
}
.story-footer{
text-align: center;
border-top: 1px solid #e6e6e6;
margin-top: 10%;
}
.story-footer p{
font-size: 1.4rem;
color:#969696;
padding: 5% 0 0 0;
text-transform: uppercase;
}
#menu{
padding: 2% 0 2% 0;
}
#article{
margin: 8% 0 8% 0;
}
#home-entries{
margin: 6% 0 6% 0;
}
.navbar-list{
list-style: none;
margin-bottom: 0;
}
.navbar-item{
position: relative;
float: left;
margin-bottom:5%;
height: 40px;
}
.social{
text-decoration: underline;
}
.desc{
font-style: italic;
font-size: 1.1rem;
color:#B4B4B4;
}
.desc-story{
font-size: 1.2rem;
color: #B4B4B4;
padding: 0 0 5% 0;
font-family: 'roboto mono', monospace;
}
.desc-story a{
color:#B4B4B4;
text-decoration: underline;
}
.desc a{
color:#B4B4B4;
text-decoration: underline;
}
.writings-subtext{
font-size: 1.5rem;
margin-top: 0.4rem;
color:#969696;
margin-bottom: 2%;
font-family: 'roboto mono', monospace;
}
/* POTOGRAPHY related */
.cover-image{
margin: 0 auto;
padding: none;
}
.cover-image img{
width: 100%;
top:0; left:0;
}
.photo-set-title {
text-decoration: none;
color: #5A5A5A;
font-size: 1.7rem;
font-weight: 400;
font-family: 'roboto mono', monospace;
}
#photography-cover{
margin: 1% 2% 0% 0%;
text-align: center;
}
#photography-cover img{
max-width: 100%;
}
.photo-date{
font-size: 1.1rem;
color: #969696;
}
.photo-container {
margin-bottom: 2%;
margin-top: 8%;
}
.photo-container img{
max-width: 100%;
}
.photo-container:hover img{
}
.photo-story-container p{
text-align: center;
padding: 3% 0 3% 0;
}
.photo-breadcrumbs{
display: inline;
margin-bottom: 10%
}
.photo-breadcrumbs-one a{
color: #969696;
font-size: 1.3rem;
font-weight: 300;
text-decoration: none;
font-family: 'roboto mono', monospace;
}
.photo-breadcrumbs-two{
font-size: 2.5rem;
font-weight: 300;
text-decoration: none;
font-family: 'roboto mono', monospace;
}
/* VIDEO related */
video{
width:100%;
}
.video-container{
width: 100%;
margin: auto;
padding: 0 0 10% 0;
}
.video-container-400{
max-width: 400px;
margin: auto;
}
.video-container-360{
max-width: 360px;
margin: auto;
}
.video-container-682{
max-width: 682px;
margin: auto;
}
.video-container-644{
max-width: 682px;
margin: auto;
}
/* PORTOFLIO related */
.dates {
color: #969696;
font-size: 1.3rem;
font-weight: 300;
text-decoration: none;
font-family: 'roboto mono', monospace;
}
.photo-caption {
font-family: 'DINProMed', 'Roboto', sans-serif;
color: #969696;
font-size: 1.4rem;
font-weight: 300;
text-decoration: none;
}
.portfolio-project-container{
text-align: left;
padding: 4% 0 4% 0;
}
.portfolio-project-container p{
text-align: left;
padding: 3% 0 3% 0;
}
.portfolio-container{
margin-bottom: 20%;
}
.portfolio-big-container{
margin-bottom: 10%;
}
.portfolio-big-container img{
max-width: 100%;
display: block;
margin-bottom: 20px;
}
.portfolio-container img{
max-width: 100%;
display: block;
margin-bottom: 20px;
}
.portfolio-set-title {
text-decoration: none;
color: #5A5A5A;
font-size: 1.7rem;
font-weight:300;
font-family: 'roboto mono', monospace;
}
/* Typography */
h1, h2, h3, h4, h5, h6 {
margin-top: 0;
}
h1 { font-weight:300; line-height: 1.2; color: #000; font-family: 'Roboto Mono', monospace; padding-bottom: 30px; margin-top:4%; text-transform: uppercase;}
h2 { line-height: 1.25; margin-bottom: 2rem; margin-top: 2rem; font-weight: 300; color:#333335; letter-spacing: 0.04rem; font-family: 'Roboto Mono', monospace; }
h3 { font-size: 2.5rem; line-height: 1.25; margin-bottom: 0rem; margin-top: 2%; font-weight: 400;font-family: 'Roboto Mono', monospace; }
h4 { font-weight:400; line-height: 1.2; letter-spacing: 0rem; }
h5 { font-size: 1.4rem; line-height: 1.5; padding: 2% 0 0% 0; color: #969696; margin-bottom: .2rem; font-weight:500; letter-spacing: 0.1rem;}
h6 { font-family: 'Open Sans', serif; text-transform:uppercase; font-size: 1.5rem; font-weight:600; line-height: 1.2; letter-spacing: 0rem;}
/* phone */
#media (max-width: 550px) {
.header p{
font-size: 6rem;
font-weight: 700;
line-height: 6rem;
font-family: 'roboto', monospace;
}
}
p {
margin-top: 0;
padding-right:0%;
line-height: 3rem}
p a{
/* text-decoration: underline; */
color: #2963ff;
}
/* Links */
a {
text-decoration: none;
color: #969696;
cursor: pointer;
}
/* Forms */
input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea,
select {
height: 38px;
padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
background-color: #fff;
border: 1px solid #D1D1D1;
border-radius: 4px;
box-shadow: none;
box-sizing: border-box; }
/* Removes awkward default styles on some inputs for iOS */
input[type="email"],
input[type="number"],
input[type="search"],
input[type="text"],
input[type="tel"],
input[type="url"],
input[type="password"],
textarea {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none; }
textarea {
min-height: 65px;
padding-top: 6px;
padding-bottom: 6px; }
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
border: 1px solid #33C3F0;
outline: 0; }
label,
legend {
display: block;
margin-bottom: .5rem;
font-weight: 600; }
fieldset {
padding: 0;
border-width: 0; }
input[type="checkbox"],
input[type="radio"] {
display: inline; }
label > .label-body {
display: inline-block;
margin-left: .5rem;
font-weight: normal; }
/* Lists */
ul {
list-style: circle inside; }
ol {
list-style: decimal inside; }
ol, ul {
padding-left: 0;
margin-top: 0; }
ul ul,
ul ol,
ol ol,
ol ul {
margin: 1.5rem 0 1.5rem 3rem;
font-size: 90%; }
li {
padding-left: 1rem;
margin-bottom: 1rem; }
/* Code */
code {
padding: .2rem .5rem;
margin: 0 .2rem;
font-size: 90%;
white-space: nowrap;
background: #F1F1F1;
border: 1px solid #E1E1E1;
border-radius: 4px; }
pre > code {
display: block;
padding: 1rem 1.5rem;
white-space: pre; }
/* Tables */
th,
td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #E1E1E1; }
th:first-child,
td:first-child {
padding-left: 0; }
th:last-child,
td:last-child {
padding-right: 0; }
/* Spacing */
button,
.button {
margin-bottom: 1rem; }
input,
textarea,
select,
fieldset {
margin-bottom: 1.5rem; }
pre,
blockquote,
dl,
figure,
table,
p,
ul,
ol,
form {
margin-bottom: 2.5rem; }
/* Utilities */
.u-full-width {
width: 100%;
box-sizing: border-box; }
.u-max-full-width {
max-width: 100%;
box-sizing: border-box; }
.u-pull-right {
float: right; }
.u-pull-left {
float: left; }
/* Misc */
hr {
margin-top: 3rem;
margin-bottom: 3.5rem;
border-width: 0;
border-top: 1px solid #E1E1E1; }
/* Clearing */
/* Self Clearing Goodness */
.container:after,
.row:after,
.u-cf {
content: "";
display: table;
clear: both; }
/* Media Queries */
/*
Note: The best way to structure the use of media queries is to create the queries
near the relevant code. For example, if you wanted to change the styles for buttons
on small devices, paste the mobile query code up in the buttons section and style it
there.
*/
/* Larger than mobile */
#media (min-width: 400px) {}
/* Larger than phablet (also point when grid becomes active) */
#media (min-width: 550px) {}
/* Larger than tablet */
#media (min-width: 750px) {}
/* Larger than desktop */
#media (min-width: 1000px) {}
/* Larger than Desktop HD */
#media (min-width: 1200px) {}
/* MORE CSS */
.value-prop {
margin-top: 1rem; }
.value-props {
margin-top: 4rem;
margin-bottom: 4rem; }
.docs-section {
padding: 4rem 0;
margin-bottom: 0;}
.value-img {
display: block;
text-align: center;
margin: 2.5rem auto 0; }
.example-grid .column,
.example-grid .columns {
background: #EEE;
text-align: center;
border-radius: 4px;
font-size: 1rem;
text-transform: uppercase;
height: 30px;
line-height: 30px;
margin-bottom: .75rem;
font-weight: 600;
letter-spacing: .1rem; }
.example {
position: relative;
margin-top: 4rem; }
.example-screenshot-wrapper {
border-radius: 0px;
display: block;
position: relative;
overflow: hidden;
height: 250px;
}
.example-screenshot-wrapper:hover {
box-shadow: 0, 0;
}
.example-screenshot {
width: 100%;
height: auto; }
.navbar {
display: none; }
/* Larger than phone */
#media (min-width: 550px) {
.value-props {
margin-top: 9rem;
margin-bottom: 7rem; }
.value-img {
margin-bottom: 1rem; }
.example-grid .column,
.example-grid .columns {
margin-bottom: 1.5rem; }
.docs-section {
padding: 0rem 0; }
.example-send-yourself-copy {
float: right;
margin-top: 12px; }
.example-screenshot-wrapper {
position: absolute;
width: 48%;
height: 100%;
left: 0;
max-height: none; }
}
/* ----------- BUTTONS ----------- */
/* NAVIGATION BAR */
.navbar-link {
font-family: 'DINProBold', 'Roboto', sans-serif;
color: #969696;
margin-right: 35px;
font-size: 1.3rem;
text-transform: uppercase;
letter-spacing: 0.2rem;
border: none;
white-space: nowrap;
background-color: #FFF;
padding-bottom: 5px;
border-radius: 0px;
padding-left: 0;
padding-right: 0;
cursor: pointer;
border-bottom: 5px solid #FFF;
transition: color .20s ease-in;
-moz-transition: color .20s ease-in;
-webkit-transition: color .20s ease-in;
transition: border-bottom .20s ease-in;
-moz-transition: border-bottom .20s ease-in;
-webkit-transition: border-bottom .20s ease-in;
}
.navbar-link:hover {
color:#333333;
border-bottom: 5px solid #333333;
}
#active {
color: #333333;
border-bottom: 5px solid #333333;
}
/* SEE MORE */
.button {
font-family: 'DINProBold', 'Roboto', sans-serif;
color: #969696;
margin-right: 35px;
font-size: 1.3rem;
text-transform: uppercase;
letter-spacing: 0.2rem;
white-space: nowrap;
background-color: #FFF;
padding-bottom: 5px;
border-radius: 0px;
padding-left: 0;
padding-right: 0;
cursor: pointer;
border-bottom: 5px solid #FFF;
transition: color .20s ease-in;
-moz-transition: color .20s ease-in;
-webkit-transition: color .20s ease-in;
transition: border-bottom .20s ease-in;
-moz-transition: border-bottom .20s ease-in;
-webkit-transition: border-bottom .20s ease-in;
}
.button:hover {
color:#333333;
border-bottom: 5px solid #333333;
}
#homebtn {
margin-right: 0px;
}
#main-button {
color: #fed230;
}
#main-button:hover {
border-bottom: 5px solid #fed230;
}
#fires-button {
color: #6AABC8;
}
#massive-button {
color: #0099F7;
}
#massive-button:hover {
border-bottom: 5px solid #0099F7;
}
#processing-button {
color: #D22A88;
}
#processing-button:hover {
border-bottom: 5px solid #D22A88;
}
#volume-UI-button {
color: #FFB2AD;
}
#volume-UI-button:hover {
border-bottom: 5px solid #FFB2AD;
}
#accessibility-button {
color: #02b875;
}
#accessibility-button:hover {
border-bottom: 5px solid #02b875;
}
.contact-link {
color: #969696;
cursor: pointer;
}
.contact-link:hover {
color: #333333;
cursor: pointer;
}
.contact-link-dribble {
color: #969696;
cursor: pointer;
}
.contact-link-dribble:hover {
color: #ea4c89;
cursor: pointer;
}
.contact-link-linkedin {
color: #969696;
cursor: pointer;
}
.contact-link-linkedin:hover {
color: #0077B5;
cursor: pointer;
}
#clothed-button {
color: #DD5837;
}
#clothed-button:hover {
border-bottom: 5px solid #DD5837;
}
#sign-button {
color: #0084FF;
}
#sign-button:hover {
border-bottom: 5px solid #0084FF;
}
#cablecar-button {
color: #EF6967;
}
#cablecar-button:hover {
border-bottom: 5px solid #EF6967;
}
/* ----------- LINKS ----------- */
#link {
color: #2963ff;
font-family: 'DINProBold', 'Roboto', sans-serif;
border-bottom: 3px solid #FFF;
transition: border-bottom .20s ease-in;
-moz-transition: border-bottom .20s ease-in;
-webkit-transition: border-bottom .20s ease-in;
}
#link:hover {
border-bottom: 3px solid #2963ff;
}
.centered {
display: block;
margin-left: auto;
margin-right: auto;
}
.center {
text-align: center !important;
}
#option-back:hover {
color: #333333;
cursor: pointer;
}
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Basic Page Needs
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta charset="utf-8">
<title> 🙋 Megan Mitchell's Portfolio</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#000000">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-121696572-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-121696572-1');
</script>
<!-- End Google Analytics -->
<!-- Mobile Specific Metas
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- FONT
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500" rel="stylesheet">
<!-- CSS
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
<!-- Javascript
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<script type="text/javascript" src="javascript/code.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Favicon
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<link rel="icon" type="image/png" href="http://perceptioncube.com/M_Port/images/favicon.png">
</head>
<body>
<!-- On load fade in page -->
<script>
$(document).ready(function() {
$("body").css("display", "none");
$("body").fadeIn(150);
$("a.transition").click(function(event){
event.preventDefault();
linkLocation = this.href;
$("body").fadeOut(100, redirectPage);
});
function redirectPage() {
window.location = linkLocation;
}
});
</script>
<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<div class="container">
<!-- logo -->
<div class="onecolumn" style="margin-top: 4%; margin-bottom:2%;">
<a href="index.html"> <img border="0" alt="Megan Mitchell Portfolio" src="images/megan_mitchell_dark.png" width="200" height="57">
</div>
<!-- end logo-->
<section class="header">
<div class="row" id="menu">
<div class="onecolumn" style="margin-top: 2%; margin-bottom:10%;">
<ul class="navbar-list"">
<li class="navbar-item"><a class="transition, navbar-link" id="active" href="index.html">Work</a></li>
<li class="navbar-item"><a class="transition, navbar-link" href="contact.html">Contact</a></li>
<li class="navbar-item"><a class="transition, navbar-link" href="illustrations.html">Illustrations</a></li>
<li class="navbar-item"><a class="transition, navbar-link" href=" https://thenounproject.com/megan.mitchell/" target="blank">Icons</a></li>
</ul>
</div>
</div>
<div class="row">
<div class="onecolumn">
<p id="DINBold">Interactive Art Director & designer, currently at Apple. </p>
</div>
</div>
</section>
<div class="docs-section examples" id="home-entries">
<a name="apple"></a>
<!-- Apple 1 -->
<div class="home-feature-container">
<div class="row example">
<a class="example-screenshot-wrapper" id="google-img" href="apple_pass.html"> <img class="example-screenshot" src="images/landing/apple_landing.jpg"> </a>
<div class="one-half offset-by-one-half column">
<br>
<h2 class="example-header"><span id="heading">Various Projects </span><span id="heading2">for Apple</span></h2>
<p><span class="dates" id="subheading">Nov 2014 · Present</span></p>
<p class="example-description">A variety of interactive projects for Apple since 2014 ranging from marketing websites to application design.</p>
<a class="button" id="main-button" href="apple_pass.html">See more</a>
<br>
<br>
</div>
</div>
</div>
<a name="ocho"></a>
<!-- ocho -->
<div class="home-feature-container">
<div class="row example">
<a class="example-screenshot-wrapper" id="google-img" href="ocho.html"> <img class="example-screenshot" src="images/landing/ocho_landing.jpg"> </a>
<div class="one-half offset-by-one-half column">
<br>
<br>
<h2 class="example-header"><span id="heading">Product Design </span><span id="heading2">for Ocho</span></h2>
<p><span class="dates" id="subheading">Produced for Ocho</span></p>
<p class="example-description">Lead designer halfway through the project to assist with look and feel, design needs, on-boarding, UI and UX.</p>
<a class="button" id="main-button" href="ocho.html">See more</a>
<br>
<br>
<br>
</div>
</div>
</div>
<a name="chaos"></a>
<!-- State Farm Chaos -->
<div class="home-feature-container">
<div class="row example">
<a class="example-screenshot-wrapper" id="google-img" href="statechaos.html"> <img class="example-screenshot" src="images/landing/chaos_landing.jpg"> </a>
<div class="one-half offset-by-one-half column">
<br>
<h2 class="example-header"><span id="heading">App Design </span><span id="heading2">for Statefarm</span></h2>
<p><span class="dates" id="subheading">Produced at DDB</span></p>
<p class="example-description">Application concept and design for State of Chaos application that launches from an iAd.</p>
<a class="button" id="main-button" href="chaos.html">See more</a>
<br>
<br>
</div>
</div>
</div>
</div>
<!-- End Document
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
</body>
</html>
I'm not sure how I did this, but after cleaning my cache I realized that my site that I'm working on has lost the containers somehow. Reverting to older code hasn't helped fix the issue so I'm not sure where to start fixing this.
The site looks ok in safari, but is broken in Firefox or chrome. Any support for a coding novice would be really appreciated.
http://perceptioncube.com/M_Port/index.html
Currently all of the content is going edge to edge on the browser window, and but is could be centered within a 980px container. This has resulted in all content to be uncentered in a containing on all pages. Additionally I'm images throughout the site had a max width to them, but now they continue to grow as I increase the size of the browser.
EDIT: Actual answer: You are missing a /* as the first line of your CSS to start the block comment. The broken block comment is breaking the rules below it.
Looks to me like the CSS in your media queries are overriding the default styles, so on any device larger than 400px it will not apply the max-width: 960px; rule you are looking for. This is the problem code:
/* For devices larger than 400px */
#media (min-width: 400px) {
.container {
width: 85%;
padding: 0;
}
}
/* For devices larger than 550px */
#media (min-width: 550px) {
.container {
width: 90%;
}
}
You can see this by inspecting the element in Chrome dev tools:

CSS: How to create a button with an arrow placedo on the right

I need to reproduce following button:
I have already tried to create it, but the arrow on the right is not the same as in the picture. How can I reproduce the same white arrow?
.sBtn {
display: inline-block;
background: #908589;
border: 0;
color: #fff;
font-weight: 700;
font-size: 1.2em;
letter-spacing: 0.04em;
line-height: 2.5em;
padding: 0 0 0 1em;
outline: none;
text-decoration: none;
margin-top: 14px;
}
...and so on...
https://jsfiddle.net/jobgaraux/h81z00jL/1/
Here I made it for you jsFiddle
Edited HTML:
<span class="arrowBtn"> <span class="icon"></span></span>
You can create CSS3 arrow from borders:
.sBtn-go .arrowBtn .icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 0;
height: 0;
border-style: solid;
border-width: 15px 0 15px 13px;
border-color: transparent transparent transparent white;
}
may be this will help youl
.sBtn {
display: inline-block;
background: #908589;
border: 0;
color: #fff;
font-weight: 700;
font-size: 1.2em;
letter-spacing: 0.04em;
line-height: 2.5em;
padding: 0 0 0 1em;
outline: none;
text-decoration: none;
margin-top: 14px;
}
.arrowBtn {
display: inline-block;
line-height: 2.5em;
text-align: center;
background: #333;
color: white;
font-size: 1em;
width: 2.5em;
transition: margin 200ms;
margin-left: .75em;
position:relative;
left:2px;
}
.sBtn-go .arrowBtn {
background-color: #B6AFB1;
}
.sBtn-go .arrowBtn:hover {
}
.sBtn-go .arrowBtn {
background-color: desaturate(darken(#F8AD6C,5%),5%);
}
<button class="sBtn sBtn-go" name="search">Search<span class="arrowBtn">&#x25BA</span></button>
.sBtn {
display: inline-block;
background: #908589;
border: 0;
color: #fff;
font-weight: 700;
font-size: 1.2em;
letter-spacing: 0.04em;
line-height: 2.5em;
padding: 0 0 0 1em;
outline: none;
text-decoration: none;
margin-top: 14px;
}
.arrowBtn {
display: inline-block;
line-height: 2.5em;
text-align: center;
background: #333;
color: white;
font-size: 1em;
width: 2.5em;
transition: margin 200ms;
margin-left: .75em;
}
.sBtn-go .arrowBtn {
background-color: #B6AFB1;
}
.sBtn-go .arrowBtn:hover {
}
.sBtn-go .arrowBtn {
background-color: desaturate(darken(#F8AD6C,5%),5%);
}
<button class="sBtn sBtn-go" name="search">Search<span class="arrowBtn">&#x25BA</span></button>

Sub Menu Sensitive In Chrome But Fine In Firefox

I'm only a year in to Web Design. I've been learning menus at Lynda.com and specifically have a problem creating a sub menu.
I've made the sub menu how I want it, however when I flick between the list items on my menu they change over too quickly.
See on the picture below:
http://s22.postimg.org/699f35hm9/macca_travel.png
If you look at the position of the cursor, it is still on the 'About' tab, but the 'Blog' hover has lit up and has been selected.
The two sections with sub menus are the 'Blog' tab and the 'Photos' tab. These two tabs don't cross over smoothly and I think it's because for whatever reason they're selecting too quickly.
I don't know why :)
Here is my CSS:
#font-face {
font-family: 'telegraficoregular';
src: url('../FONTS/telegrafico-webfont.eot');
src: url('../FONTS/telegrafico-webfont.eot?#iefix') format('embedded-opentype'),
url('../FONTS/telegrafico-webfont.woff2') format('woff2'),
url('../FONTS/telegrafico-webfont.woff') format('woff'),
url('../FONTS/telegrafico-webfont.ttf') format('truetype'),
url('../FONTS/telegrafico-webfont.svg#telegraficoregular') format('svg');
font-weight: normal;
font-style: normal;
}
.cf:after {
content: "";
display: table;
clear: both;
}
html, body, head, nav, article, aside, section, h3, h4, footer, ul, li {
margin: 0;
padding: 0;
}
/*Global Styles*/
html {
background: white;
margin: 0;
padding: 0;
}
body {
width: 100%;
height: 1200px;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
h1 {
font-family: telegraficoregular;
font-size: 3em;
color: white;
padding: 0;
margin:0;
text-align: center;
}
h2 {
font-family: telegraficoregular;
font-size: 1em;
font-style: italic;
color: white;
padding: 0;
margin: 0;
text-align: center;
}
p {
font-family: serif;
font-size: 1.1em;
color: black;
text-align:left;
padding-left:70px;
}
h4 + p {
font-family: serif;
font-size: 1.1em;
color: black;
text-align:left;
padding-left:70px;
padding-top: 10px;
}
/*Nav Styles */
header {
background:#6593b5;
width: 100%;
height: 160px;
margin:0 auto;
}
nav {
background: black;
height: 2em;
}
nav ul li {
float: left;
}
nav ul li a {
display: block;
padding:0 2em;
line-height: 2em;
color: white;
font-family: telegraficoregular;
text-decoration: none;
}
li, ul {
position: relative;
margin: 0;
padding: 0;
}
ul.SubMenu {
float: none;
width: auto;
height: auto;
list-style: none;
background: black;
color: white;
position: absolute;
left: -9000em;
}
ul.SubMenu li{
float: none;
}
ul.SubMenu li a{
display:block;
border-bottom: 1px solid white;
padding: .2em 2em;
white-space: nowrap;
}
li:hover ul {
left: 0;
}
li:hover ul {
left: 0;
}
/* Article Styles */
article {
width: 896px;
padding: 32px;
}
/*Section Styles */
section.China {
text-align: center;
margin: 80px auto;
padding: 20px;
}
section h3 {
font-family: telegraficoregular;
font-size: 2em;
border-bottom: 1px solid black;
padding: 5px;
}
section h4 {
font-family: telegraficoregular;
font-size: 1.4em;
padding-top: 60px;
padding-left: 70px;
text-align: left;
text-decoration: underline;
}
section.China img {
position: relative;
top: 20px;
border-radius: 5px;
}
section.Australia {
text-align: center;
margin: 20px auto;
padding: 20px;
}
section.Australia img {
position: relative;
top: 20px;
border-radius: 5px;
}
section.Thailand {
text-align: center;
margin: 20px auto;
padding: 20px;
}
section.Thailand img {
position: relative;
top: 20px;
border-radius: 5px;
}
/* Link Styles*/
a:hover {
color: orange;
height: 32px;
background: black;
}
ul.SubMenu li a:hover {
background: orange;
color: white;
}
/* About Styles */
#AboutContent{
width: 960px;
height: 1200px;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
#AboutHeader {
text-align: center;
margin: 20px auto;
padding: 20px;
}
#AboutHeader img {
display: block;
margin: 0 auto;
text-align: center;
}
#AboutHeader h2 {
font-family: telegraficoregular;
font-size: 1.5em;
text-decoration: underline;
color: black;
padding: 0;
margin-top: 20px;
text-align: center;
}
h2 + img {
position: relative;
top: 50px;
border-radius: 5px;
}
#AboutHeader p {
font-family: serif;
font-size: 1.1em;
color: black;
text-align:left;
padding:50px 0 0 100px;
}
/*Photos Content */
#PhotoContent{
width: 960px;
height:auto;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
/* Photos Gallery */
#ChinaPhotos {
width: 960px;
height:1200px;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
#ChinaPhotos h3 {
font-family: telegraficoregular;
font-size: 2em;
border-bottom: 1px solid black;
padding: 5px;
text-align: center;
margin-top: 20px;
}
#ChinaPhotos img {
margin-top: 20px;
border: 1px solid black;
}
#ChinaPhotos a .Thumb:hover {
width: 320px;
height: 240px;
}
/* Container Styles */
#Content {
width: 960px;
height: auto;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
/* Footer Styles */
.Footer {
width: 100%;
height: 160px;
background: black;
}
.Footer p {
font-family: telegraficoregular;
color: white;
font-style: italic;
line-height: 160px;
text-align: center;
}
Thanks Joe
Add the following to each section of your CSS:
ul.SubMenu {
margin-top: 2em;
}
nav ul li a {
float: left;
}
nav ul li {
display: block;
}

Multiple Identical RGBA colours not working

basically I wanted to try have the same rgba value in three different areas. I wanted my body, nav and footer all to have rgba(0,0,0,.8).
My body works but the nav and footer just show was solid black without the transparency...
I've tried changing the transparency slightly so they're different but that doesn't work either.
Are you only allowed to use it once?
Joe
#font-face {
font-family: 'telegraficoregular';
src: url('../FONTS/telegrafico-webfont.eot');
src: url('../FONTS/telegrafico-webfont.eot?#iefix') format('embedded-opentype'),
url('../FONTS/telegrafico-webfont.woff2') format('woff2'),
url('../FONTS/telegrafico-webfont.woff') format('woff'),
url('../FONTS/telegrafico-webfont.ttf') format('truetype'),
url('../FONTS/telegrafico-webfont.svg#telegraficoregular') format('svg');
font-weight: normal;
font-style: normal;
}
.cf:after {
content: "";
display: table;
clear: both;
}
html, body, head, nav, article, aside, section, h3, h4, footer, ul, li {
margin: 0;
padding: 0;
}
/*Global Styles*/
html {
margin: 0;
padding: 0;
}
body {
width: 100%;
margin: 0 auto;
padding: 0;
background:rgba(0,0,0,.9);
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
}
h1 {
font-family: telegraficoregular;
font-size: 3em;
color: rgb(50,153,187);
padding: 0;
margin:0;
text-align: center;
}
h2 {
font-family: telegraficoregular;
font-size: 1em;
font-style: italic;
color: #003366;
padding: 0;
margin: 0;
text-align: center;
}
p {
font-family: serif;
font-size: 1.1em;
color: black;
text-align:left;
padding-left:70px;
}
h4 + p {
font-family: serif;
font-size: 1.1em;
color: black;
text-align:left;
padding-left:70px;
padding-top: 10px;
}
/*Nav Styles */
header {
background:rgb(233,233,233);
width: 100%;
height: 160px;
margin:0 auto;
}
nav {
background:rgba(0,0,0,.8);
width: auto;
height: 64px;
}
nav ul.TopMenu li {
float: left;
list-style: none;
width: 150px;
}
nav ul.TopMenu {
width: 600px;
margin: 0 auto;
}
nav ul.TopMenu li a {
display:block;
line-height: 64px;
padding:0 2em;
text-align: center;
font-family: telegraficoregular;
font-size: 1.2em;
text-decoration: none;
}
li {
position: relative;
}
nav ul.SubMenu{
float: none;
text-align: center;
border-bottom: 1px solid white;
position: absolute;
left: -9000em;
top: 64px;
height: auto;
max-height: 0;
-moz-transition: max-height 0.5s ease-in-out;
-webkit-transition: max-height 0.5s ease-in-out;
-o-transition: max-height 0.5s ease-in-out;
transition: max-height 0.5s ease-in-out;
overflow:hidden;
z-index:999;
}
nav ul.SubMenu li{
height: 32px;
font-family: telegraficoregular;
font-size: 1em;
padding: 0;
margin: 0;
border-bottom: 1px solid white;
}
nav ul.SubMenu li a{
display:block;
line-height: 32px;
padding: 0px;
margin: 0;
}
.TopMenu li:hover ul{
left: 0;
max-height: 20em;
}
ul.SubMenu li a{
background: rgba(0,0,0,.8);
border-bottom: 1px solid white;
}
ul.SubMenu li a:visited {
color: white;
}
ul.SubMenu li a:hover {
background: rgba(255,165,0,.8);
}
a:visited {
color: white;
}
a:hover {
color: orange;
}
/* Article Styles */
article {
width: 896px;
padding: 32px;
}
/*Section Styles */
section.China {
text-align: center;
margin: 20px auto;
padding: 20px;
}
section h3 {
font-family: telegraficoregular;
font-size: 2em;
border-bottom: 1px solid black;
padding: 5px;
}
section h4 {
font-family: telegraficoregular;
font-size: 1.4em;
padding-top: 60px;
padding-left: 70px;
text-align: left;
text-decoration: underline;
}
section.China img {
position: relative;
top: 20px;
border-radius: 5px;
}
section.Australia {
text-align: center;
margin: 20px auto;
padding: 20px;
}
section.Australia img {
position: relative;
top: 20px;
border-radius: 5px;
}
section.Thailand {
text-align: center;
margin: 20px auto;
padding: 20px;
}
section.Thailand img {
position: relative;
top: 20px;
border-radius: 5px;
}
/* Link Styles*/
/* About Styles */
#AboutContent{
width: 960px;
height: 1200px;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
#AboutHeader {
text-align: center;
margin: 20px auto;
padding: 20px;
}
#AboutHeader img {
display: block;
margin: 0 auto;
text-align: center;
}
#AboutHeader h2 {
font-family: telegraficoregular;
font-size: 1.5em;
text-decoration: underline;
color: black;
padding: 0;
margin-top: 20px;
text-align: center;
}
h2 + img {
position: relative;
top: 50px;
border-radius: 5px;
}
#AboutHeader p {
font-family: serif;
font-size: 1.1em;
color: black;
text-align:left;
padding:50px 0 0 100px;
}
/*Photos Content */
#PhotoContent{
width: 960px;
height:auto;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
/* Photos Gallery */
#ChinaPhotos {
width: 960px;
height:1200px;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
#ChinaPhotos h3 {
font-family: telegraficoregular;
font-size: 2em;
border-bottom: 1px solid black;
padding: 5px;
text-align: center;
margin-top: 20px;
}
#ChinaPhotos img {
margin-top: 20px;
border: 1px solid black;
}
#ChinaPhotos a .Thumb:hover {
width: 320px;
height: 240px;
}
/* Container Styles */
#Content {
width: 960px;
height: auto;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
/* Footer Styles */
.Footer {
width: 100%;
height: 80px;
background: rgba(0,0,0,.7);
}
.Footer p {
font-family: telegraficoregular;
color: white;
font-style: italic;
line-height: 80px;
text-align: center;
}
So, it looks as though it's the overlap that is causing your problems (see comment above. I changed the background colours in the nav and footer and they show up just find.
It's the fact that you have two elements with 80% opacity overlapped, and the outcome looks black.
html, body, head, nav, article, aside, section, h3, h4, footer, ul, li {
margin: 0;
padding: 0;
}
/*Global Styles*/
html {
margin: 0;
padding: 0;
}
body {
width: 100%;
margin: 0 auto;
padding: 0;
background:rgba(0,0,0,.9);
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
}
h1 {
font-family: telegraficoregular;
font-size: 3em;
color: rgb(50,153,187);
padding: 0;
margin:0;
text-align: center;
}
h2 {
font-family: telegraficoregular;
font-size: 1em;
font-style: italic;
color: #003366;
padding: 0;
margin: 0;
text-align: center;
}
p {
font-family: serif;
font-size: 1.1em;
color: black;
text-align:left;
padding-left:70px;
}
h4 + p {
font-family: serif;
font-size: 1.1em;
color: black;
text-align:left;
padding-left:70px;
padding-top: 10px;
}
/*Nav Styles */
header {
background:rgb(233,233,233);
width: 100%;
height: 160px;
margin:0 auto;
}
nav {
background:rgba(255,0,0,.8);
width: auto;
height: 64px;
}
nav ul.TopMenu li {
float: left;
list-style: none;
width: 150px;
}
nav ul.TopMenu {
width: 600px;
margin: 0 auto;
}
nav ul.TopMenu li a {
display:block;
line-height: 64px;
padding:0 2em;
text-align: center;
font-family: telegraficoregular;
font-size: 1.2em;
text-decoration: none;
}
li {
position: relative;
}
nav ul.SubMenu{
float: none;
text-align: center;
border-bottom: 1px solid white;
position: absolute;
left: -9000em;
top: 64px;
height: auto;
max-height: 0;
-moz-transition: max-height 0.5s ease-in-out;
-webkit-transition: max-height 0.5s ease-in-out;
-o-transition: max-height 0.5s ease-in-out;
transition: max-height 0.5s ease-in-out;
overflow:hidden;
z-index:999;
}
nav ul.SubMenu li{
height: 32px;
font-family: telegraficoregular;
font-size: 1em;
padding: 0;
margin: 0;
border-bottom: 1px solid white;
}
nav ul.SubMenu li a{
display:block;
line-height: 32px;
padding: 0px;
margin: 0;
}
.TopMenu li:hover ul{
left: 0;
max-height: 20em;
}
ul.SubMenu li a{
background: rgba(0,0,0,.8);
border-bottom: 1px solid white;
}
ul.SubMenu li a:visited {
color: white;
}
ul.SubMenu li a:hover {
background: rgba(255,165,0,.8);
}
a:visited {
color: white;
}
a:hover {
color: orange;
}
/* Article Styles */
article {
width: 896px;
padding: 32px;
}
/*Section Styles */
section.China {
text-align: center;
margin: 20px auto;
padding: 20px;
}
section h3 {
font-family: telegraficoregular;
font-size: 2em;
border-bottom: 1px solid black;
padding: 5px;
}
section h4 {
font-family: telegraficoregular;
font-size: 1.4em;
padding-top: 60px;
padding-left: 70px;
text-align: left;
text-decoration: underline;
}
section.China img {
position: relative;
top: 20px;
border-radius: 5px;
}
section.Australia {
text-align: center;
margin: 20px auto;
padding: 20px;
}
section.Australia img {
position: relative;
top: 20px;
border-radius: 5px;
}
section.Thailand {
text-align: center;
margin: 20px auto;
padding: 20px;
}
section.Thailand img {
position: relative;
top: 20px;
border-radius: 5px;
}
/* Link Styles*/
/* About Styles */
#AboutContent{
width: 960px;
height: 1200px;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
#AboutHeader {
text-align: center;
margin: 20px auto;
padding: 20px;
}
#AboutHeader img {
display: block;
margin: 0 auto;
text-align: center;
}
#AboutHeader h2 {
font-family: telegraficoregular;
font-size: 1.5em;
text-decoration: underline;
color: black;
padding: 0;
margin-top: 20px;
text-align: center;
}
h2 + img {
position: relative;
top: 50px;
border-radius: 5px;
}
#AboutHeader p {
font-family: serif;
font-size: 1.1em;
color: black;
text-align:left;
padding:50px 0 0 100px;
}
/*Photos Content */
#PhotoContent{
width: 960px;
height:auto;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
/* Photos Gallery */
#ChinaPhotos {
width: 960px;
height:1200px;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
#ChinaPhotos h3 {
font-family: telegraficoregular;
font-size: 2em;
border-bottom: 1px solid black;
padding: 5px;
text-align: center;
margin-top: 20px;
}
#ChinaPhotos img {
margin-top: 20px;
border: 1px solid black;
}
#ChinaPhotos a .Thumb:hover {
width: 320px;
height: 240px;
}
/* Container Styles */
#Content {
width: 960px;
height: auto;
margin: 0 auto;
padding: 0;
background: white;
font-family: serif, arial, helvetica, georgia;
font-size: 16px;
color: black;
}
/* Footer Styles */
.Footer {
width: 100%;
height: 80px;
background: rgba(0,0,255,.5);
}
.Footer p {
font-family: telegraficoregular;
color: white;
font-style: italic;
line-height: 80px;
text-align: center;
}
<nav>
<ul>
<li>something</li>
<li>something else</li>
</ul>
</nav>
<footer class="Footer">
This is a footer
</footer>

Css hover transition not working on live links

Basically I'm trying to use css transitions on hover of my links. The problem is that once the links are live, (meaning a href="#" is changed to a href="yahoo.com" for example) the transitions not only stop working, but instead of opening the link, it adds the link destination to the end of my homepage address like so: "driveandambition.com/yahoo.com" which of course doesn't work. What in the actual hell is going on?? I've been pulling my hair out for hours trying to pick this booger out. It makes no sense to me why its not working or why its adding the destination to the end of the address.
I've included the css and php/html code from the sidebar.php which is the main place its happening down in the social media area. I've only included sidebar.php code but the transitions don't work on any links anywhere once they are made real. When its not real, the transitions work. I hope I have followed protocol in asking questions :( Thanks for your help, you may save a life.
Site found here driveandambition.com ...its still under construction.
<?php
/**
* #package WordPress
* #subpackage Drive and Ambition
*/
?>
<div id="menu">
<div id="m-logo"><img src="http://www.driveandambition.com/wp-content/uploads/2012/02/dna-logo.png" width="200" height="227" alt="Drive & Ambition" /></div>
<hr />
<div id="nav">
<ul id="nav-list">
<li>About</li>
<li>Blog</li>
<li>Shop D&A</li>
<li>Contact</li>
</ul>
</div>
<hr />
<div id="m-end">
<div id="social">
<span><img src="http://www.driveandambition.com/wp-content/uploads/2012/02/twttr.png" width="18" height="16" alt="D&A Twitter" />Twitter</span>
<img src="http://www.driveandambition.com/wp-content/uploads/2012/02/fcebk.png" width="8" height="16" alt="D&A Facebook" />Facebook
<a class="soc-left" href="http://vimeo.com/driveandambition" title="D&A on Vimeo" target="_blank"><img src="http://www.driveandambition.com/wp-content/uploads/2012/02/vimeo.png" width="16" height="16" alt="D&A Vimeo" />Vimeo</a>
<img src="http://www.driveandambition.com/wp-content/uploads/2012/02/tmblr.png" width="16" height="16" alt="D&A Tumblr" />Tumblr
<div class="clear"></div>
</div>
<div id="m-search"><input name="Search" type="text" id="search" value="search" size="28" maxlength="140" /></div>
<p id="extra">©2012 DRIVE & AMBITION
Site:FTWinn</p>
</div><!--end m-end-->
</div><!--end menu-->
/*
Theme Name: Drive and Ambition
Theme URI: http://www.driveandambition.com
Description: A clean and minimal theme that is compatible with WordPress 3.0
Author: W.A.T.T.S.
Author URI: http://rawinn.tumblr.com
Version: 1.0
*/
#charset "UTF-8";
#font-face {
font-family: 'BigNoodleTitlingRegular';
src: url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling-webfont.eot');
src: url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling-webfont.eot?#iefix') format('embedded-opentype'),
url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling-webfont.woff') format('woff'),
url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling-webfont.ttf') format('truetype'),
url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling-webfont.svg#BigNoodleTitlingRegular') format('svg');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'BigNoodleTitlingOblique';
src: url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling_oblique-webfont.eot');
src: url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling_oblique-webfont.eot?#iefix') format('embedded-opentype'),
url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling_oblique-webfont.woff') format('woff'),
url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling_oblique-webfont.ttf') format('truetype'),
url('http://www.driveandambition.com/wp-content/themes/DAPG/big_noodle_titling_oblique-webfont.svg#BigNoodleTitlingOblique') format('svg');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'BastardusSansRegular';
src: url('http://www.driveandambition.com/wp-content/themes/DAPG/bastardussans-webfont.eot');
src: url('http://www.driveandambition.com/wp-content/themes/DAPG/bastardussans-webfont.eot?#iefix') format('embedded-opentype'),
url('http://www.driveandambition.com/wp-content/themes/DAPG/bastardussans-webfont.woff') format('woff'),
url('http://www.driveandambition.com/wp-content/themes/DAPG/bastardussans-webfont.ttf') format('truetype'),
url('http://www.driveandambition.com/wp-content/themes/DAPG/bastardussans-webfont.svg#BastardusSansRegular') format('svg');
font-weight: normal;
font-style: normal;
}
a:link,input[type="submit"],input[type="button"] {
cursor: pointer;
}
a {
text-decoration: none;
}
img {
outline: none;
}
/*html {
background: url(http://www.driveandambition.com/wp-content/uploads/2012/02/IMG_3047.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}*/
body {
padding: 0px;
margin: 0px;
min-height: 100%;
font-family: 'BastardusSansRegular', "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
.clear {
clear: both;
}
#header {
display: none;
visibility: hidden;
}
#header h1 {
visibility: hidden;
}
#wrap {
padding-top: 15px;
padding-left: 20px;
padding-bottom: 35px;
}
#container {
/*background-color: #F06;*/
width: 100%;
min-height: 650px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#menu {
background-color: #fff;
float: left;
min-height: 628px;
width: 225px;
padding-top: 15px;
/*padding-bottom: 25px;*/
font-size: 13px;
margin-right: 35px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#m-logo {
margin-right: auto;
margin-bottom: 15px;
margin-left: auto;
width: 200px;
min-height: 227px;
}
#menu hr {
margin-top: 25px;
margin-right: auto;
margin-bottom: 20px;
margin-left: auto;
width: 185px;
border-top-width: 1px;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-top-color: #444;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: dashed;
}
#nav {
font-family: 'BigNoodleTitlingRegular', sans-serif;
font-size: 32px;
min-height: 158px;
width: 200px;
margin-right: auto;
margin-left: auto;
/*background-color:#C69;*/
}
#nav ul {
margin-bottom: 25px;
margin-left: 30px;
/*background-color: #9F9;*/
}
#nav-list li {
list-style-position: inside;
list-style-type: none;
}
#nav-list li a {
color: #555;
}
#nav-list li a:hover {
color: #000;
cursor: pointer;
-webkit-transition: color 0.7s ease-out;
-moz-transition: color 0.7s ease-out;
}
#m-end {
width: 173px;
min-height: 155px;
/*background-color: #333;*/
margin-right: auto;
margin-left: auto;
font-size: 11px;
}
#social {
margin-bottom: 15px;
min-width: 170px;
font-family: 'BigNoodleTitlingRegular', sans-serif;
line-height: 18px;
font-size: 17px;
/*background-color: #993;*/
min-height: 25px;
margin-right: auto;
margin-left: auto;
}
#social a {
color: #000;
display: block;
height: 20px;
width: 65px;
float: left;
padding: 5px;
}
#social a:hover {
color: #fff;
background-color: #000;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-transition: color 0.7s ease-out;
-moz-transition: color 0.7s ease-out;
}
.soc-left {
margin-right: 7px;
}
#m-search {
width: 170px;
height: 30px;
/*background-color: #000;*/
margin-right: auto;
margin-left: auto;
}
#search {
color: #999;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#menu p {
margin-right: auto;
margin-left: auto;
}
#extra {
font-size: 10px;
width: 170px;
line-height: 18px;
font-family: 'BastardusSansRegular';
margin-right: auto;
margin-left: auto;
font-style: italic;
}
#extra a {
color: #555;
}
#extra a:hover {
color: #F00;
}
#content {
/*background-color:#CF0;*/
margin-left: 260px;
}
/*//////// Blog //////////*/
.p-box {
background-color: #fff;
height: 260px;
width: 280px;
float: left;
padding: 25px 20px 20px 20px;
margin: 0 15px 15px 0;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.details {
height: 20px;
}
.p-date {
float:left;
font-family: 'BigNoodleTitlingRegular', sans-serif;
font-size: 15px;
letter-spacing: 1px;
color: #df1f26;
}
.p-spacer {
float:left;
font-family: 'BigNoodleTitlingRegular', sans-serif;
margin: 0px 5px 0px 3px;
font-weight: bold;
font-size: 12px;
line-height: 18px;
}
.p-cat {
float:left;
font-family: 'BigNoodleTitlingRegular', sans-serif;
letter-spacing: 1px;
}
.p-cat a {
color: #777;
}
.p-cat a:hover {
color: #000;
}
.p-title {
font-family: 'BigNoodleTitlingRegular', sans-serif;
letter-spacing: 1px;
}
.p-title h2 {
font-size: 20px;
font-weight: normal;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 5px;
margin-left: 0px;
}
.p-title h2 a {
color: #000;
}
.p-title h2 a:hover {
color: #777;
}
.image {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
overflow: hidden;
}
.image img {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.img iframe {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
/*//////// single //////////*/
#p-page {
width: 760px;
min-height: 618px;
background-color: #fff;
padding: 30px 20px 20px 20px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
#post p {
line-height: 20px;
letter-spacing: 1px;
}
#post a {
color: #f00;
}
#post a:hover {
color: #777;
-webkit-transition: color 0.7s ease-out;
-moz-transition: color 0.7s ease-out;
}
#p-meta {
background-color: #9C0;
width: 200px;
height: 25px;
}
#edit {
font-family: 'BigNoodleTitlingRegular', sans-serif;
font-size: 18px;
}
#edit a {
color: #777;
}
#edit a:hover {
color: #000;
}
/*//////// Page //////////*/
.p-comments {
font-family: 'BigNoodleTitlingRegular', sans-serif;
}
.p-comments a {
color: #777;
}
.p-comments a:hover {
color: #000;
}
#page-title {
font-family: 'BigNoodleTitlingRegular', sans-serif;
}
#page-title h1 {
font-size: 20px;
font-weight: normal;
margin: 0px;
}
#p-bod {
min-height: 350px;
width: 760px;
background-color: #fff;
margin-top: 15px;
margin-bottom: 25px;
}
#post img {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.image iframe {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
add http://www. to any external links other wise they are considered relative links.
To clarify,
Absolute links - links that go specifically to a web page; e.g. http://www.yahoo.com
Relative links - links that go to a page relative to the current one; e.g news.html
You are asking for the link to go to yoursite.com/yahoo.com and there is no page called yahoo.com within that folder, so it kind of barfs.
To navigate inside folders, for example if you have an index page, and then images separately filed (as you should for organizational purposes) you can link to them by using a relative link of '/images/theimage.png' You can use this to clean up all of the absolute links to files within your website's css.

Resources