So, I got a navigation bar with dropdown menus. Whenever I move my cursor where the drop-down menu is hidden, it opens, and I need to disable that without disabling the drop-down menu as a whole. Any tips on how to do that?
If you want to go ahead and look at the latest version of my website can be found below.
Here's the link: https://p1ayerone.github.io/
And here's the CSS code:
#import url('https://fonts.googleapis.com/css2?family=Roboto:wght#300&display=swap');
:root {
--background: rgba(54, 57, 63, .85);
}
*,
*::before,
*::after {
margin: 0px;
padding: 0px;
box-sizing: inherit;
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
background: url(../../img/bg/bg.png) fixed center;
background-attachment: fixed;
background-position: center;
font-family: 'Roboto', sans-serif;
font-weight: 400;
box-sizing: border-box;
color: silver;
}
.content {
height: 200vh;
background-size: cover;
display: grid;
place-items: center;
}
/* navigation styles start here */
header {
z-index: 999;
width: 100%;
right: 0%;
top: 0%;
position: fixed;
}
.logo {
margin: 0;
color: silver;
list-style: none;
}
.img-logo {
margin-right: 15px;
padding-top: 8px;
margin-bottom: -10px;
}
.nav-toggle {
display: none;
}
.nav-toggle-label {
position: absolute;
top: 0;
left: 0;
margin-left: 1em;
height: 100%;
display: flex;
align-items: left;
margin-top: 3.5%;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
display: block;
background: white;
height: 2px;
width: 2em;
border-radius: 2px;
position: relative;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after {
content: '';
position: absolute;
}
.nav-toggle-label span::before {
bottom: 7px;
}
.nav-toggle-label span::after {
top: 7px;
}
.nav {
text-transform: uppercase;
font-size: 1.2rem;
background: var(--background);
padding-bottom: 1.7%;
}
.nav::after {
content: "";
display: table;
clear: both;
}
.nav-main {
float: right;
list-style: none;
margin-bottom: -21px;
padding-bottom: -15px;
}
.nav-main-item {
display: inline-block;
width: 12rem;
position: relative;
}
li {
list-style: none;
}
.nav-main a {
text-align: center;
padding: 1rem;
color: #eee;
text-decoration: none;
display: block;
}
.nav-main-item a:hover {
background-color: gray;
}
.nav-main-item:hover > * {
opacity: 1;
margin: 0;
}
.navi-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.more-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.nav-toggle:checked ~ nav {
transform: scale(1,1);
}
.nav-toggle:checked ~ nav a {
opacity: 1;
transition: opacity 250ms ease-in-out 250ms;
}
.destiny-intro-p {
padding-left: 100px;
font-size: 1.3rem;
}
.destiny-intro-h1 {
font-size: 3rem;
}
.body-block {
background-color: black;
color: white;
padding-bottom: 6%;
}
#media screen and (min-width: 800px) {
.nav-toggle-label {
display: none;
}
header {
z-index: 999;
width: 100%;
right: 0%;
top: 0%;
position: fixed;
}
.logo {
margin: 0;
color: silver;
list-style: none;
padding-top: 15;
}
.nav {
text-transform: uppercase;
font-size: 1.2rem;
background: var(--background);
}
.nav::after {
content: "";
display: table;
clear: both;
}
.nav-main {
float: right;
list-style: none;
}
.nav-main-item {
display: inline-block;
width: 10rem;
position: relative;
}
.nav-main a {
text-align: center;
padding: 1rem;
color: white;
text-decoration: none;
display: block;
}
.nav-main-item a:hover {
background-color: silver;
}
.nav-main-item:hover > * {
opacity: 1;
margin: 0;
}
.navi-main-item {
opacity: 0;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.Discord {
float: right;
}
.gif-Destiny {
width: 200px;
float: right;
color: silver;
}
.Zachary {
color: black;
text-decoration: none;
}
.introduction {
color: black;
}
.footer {
background-color: #1F2E4B;
color: white;
text-align: center;
font-size: 20px;
float: center;
margin-top: 100%;
}
.CbZD{
color: #00FFFF;
font-size: 30px;
}
}
.Discord {
float: right;
}
.img-Destiny {
padding-top: 0px;
width: 300px;
float: right;
color: black;
}
.Zachary {
color: black;
text-decoration: none;
}
.introduction {
color: black;
}
.footer {
background-color: #1F2E4B;
color: white;
text-align: center;
font-size: 20px;
float: center;
}
.CbZD{
color: #00FFFF;
font-size: 30px;
}
/* Videos */
.tse {
color: #07FC1B;
text-align: center;
}
/* Characters */
.img-TBG {
background-color: white;
color: black;
float: left;
width: 300px;
height: 500px;
}
/* Applications */
.silver-box {
background-color: silver;
color: black;
height: 1400px;
width: 640px;
}
/* About Me */
.abtme {
width: 50%;
margin: 0 auto;
}
/* Links */
.contact-me {
color: silver;
}
.gmail-footer {
color: silver;
}
.twitter-footer {
color: silver;
}
/* Contact */
.contact-title {
margin-top: 100px;
color: white;
text-transform: uppercase;
transition: all 4s ease-in-out;
}
.contact-title h1 {
font-size: 32px;
line-height: -10px;
}
.contact-title h2 {
font-size: 16px;
}
form {
margin-top: 50px;
transition: all 4s ease-in-out;
}
.form-control {
width: 600px;
background: var(--background);
border: none;
outline: none;
border-bottom: 1px solid gray;
color: white;
font-size: 18px;
margin-bottom: 16px;
}
input {
height: 45px;
}
form .submit {
background: #ff5722;
border-color: transparent;
color: #fff;
font-size: 20px;
font-weight: bold;
letter-spacing: 2px;
height: 50px;
margin-top: 20px;
}
form .submit:hover {
background-color: #f44336;
cursor: pointer;
}
Instead of using opacity:0 and opacity:1 to display the dropdown, you can use display:none and display:inline-block. When using opacity, it doesn't remove the element from the page, which is why the dropdown would appear when hovering in that area.
Can read more about this here https://magnusbenoni.com/difference-between-display-visibility-opacity/
.nav-main-item:hover > .navi-main-item {
display: inline-block;
margin: 0;
}
.navi-main-item {
display: none;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
Related
I need help making my navigation bar mobile friendly.
I tried following a few tutorials, but none of them worked.
Here's the web site's link (for the HTML) and here's the link to the CSS code.
I've tried using the #media tag, but it doesn't seem to apply to any of the content inside of the #media tag.
Here's the Media query for the CSS code:
```#media screen and (min-width: 800px) {
.nav-toggle-label {
display: none;
}
header {
z-index: 999;
width: 100%;
right: 0%;
top: 0%;
position: fixed;
}
.logo {
margin: 0;
color: silver;
list-style: none;
padding-top: 15;
}
.nav {
text-transform: uppercase;
font-size: 1.2rem;
background: var(--background);
}
.nav::after {
content: "";
display: table;
clear: both;
}
.nav-main {
float: right;
list-style: none;
}
.nav-main-item {
display: inline-block;
width: 10rem;
position: relative;
}
.nav-main a {
text-align: center;
padding: 1rem;
color: white;
text-decoration: none;
display: block;
}
.nav-main-item a:hover {
background-color: silver;
}
.nav-main-item:hover > .navi-main-item {
display: inline-block;
margin: 0;
}
.navi-main-item {
display: none;
position: absolute;
width: 100%;
top: 100%;
z-index: -1;
background: var(--background);
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.8);
}
.Discord {
padding-left: 72%;
margin-bottom: 80px;
}
.gif-Destiny {
width: 200px;
float: right;
color: white;
text-shadow: 2px 2px black;
}
.Zachary {
color: white;
text-decoration: none;
text-shadow: 2px 2px black;
}
.introduction {
color: white;
text-shadow: 2px 2px black;
}
.footer {
background-color: #1F2E4B;
color: white;
text-align: center;
font-size: 20px;
float: center;
margin-top: 12.5%;
}
.CbZD{
color: #00FFFF;
font-size: 30px;
}
}```
Have you tried Boostrap. It will give you a Headstart.
visit https://getbootstrap.com/docs/4.0/components/navbar/
My menu works but only when I hover and not click. It does not show up on mobile devices it only shows up as services but not clickable.
here is the code.
I believe I am missing something to make the dropdown box clickable ect.
/*--------------------------------------------------------------
# General
--------------------------------------------------------------*/
body {
background: #fff4e9;
color: #444;
font-family: "Open Sans", sans-serif;
}
a {
color: #993300;
transition: 0.5s;
}
a:hover,
a:active,
a:focus {
color: #993300;
outline: none;
text-decoration: none;
}
p {
padding: 0;
margin: 0 0 30px 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: "Montserrat", sans-serif;
font-weight: 400;
margin: 0 0 20px 0;
padding: 0;
}
/* Back to top button */
.back-to-top {
position: fixed;
display: none;
background: #993300;
color: #fff;
padding: 6px 12px 9px 12px;
font-size: 16px;
border-radius: 2px;
right: 15px;
bottom: 15px;
transition: background 0.5s;
}
.back-to-top:focus {
background: #993300;
color: #fff;
outline: none;
}
.back-to-top:hover {
background: #993300;
color: #fff;
}
/*--------------------------------------------------------------
# Top Bar
--------------------------------------------------------------*/
#topbar {
background: #fff4e9;
padding: 10px 0;
border-bottom: 1px solid #eee;
font-size: 14px;
}
#topbar .contact-info a {
line-height: 1;
color: #555;
}
#topbar .contact-info a:hover {
color: #993300;
}
#topbar .contact-info i {
color: #993300;
padding: 4px;
}
#topbar .contact-info .fa-phone {
padding-left: 20px;
margin-left: 20px;
border-left: 1px solid #e9e9e9;
}
#topbar .social-links a {
color: #555;
padding: 4px 12px;
display: inline-block;
line-height: 1px;
border-left: 1px solid #e9e9e9;
}
#topbar .social-links a:hover {
color: #993300;
}
#topbar .social-links a:first-child {
border-left: 0;
}
/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
#header {
padding: 20px 0;
height: 84px;
transition: all 0.5s;
z-index: 997;
background: #fff4e9;
box-shadow: 0px 6px 9px 0px rgba(0, 0, 0, 0.06);
}
#header #logo h1 {
font-size: 42px;
margin: 0;
padding: 0;
line-height: 1;
font-family: "Montserrat", sans-serif;
font-weight: 700;
}
#header #logo h1 a {
color: #993300;
line-height: 1;
display: inline-block;
}
#header #logo h1 a span {
color: #993300;
}
#header #logo img {
padding: 0;
margin: 0;
}
/*--------------------------------------------------------------
# Intro Section
--------------------------------------------------------------*/
#intro {
width: 100%;
height: 60vh;
position: relative;
background: url("../img/intro-carousel/1.jpg") no-repeat;
background-size: cover;
}
#intro .intro-content {
position: absolute;
bottom: 0;
top: 0;
left: 0;
right: 0;
z-index: 10;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
text-align: center;
}
#intro .intro-content h2 {
color: #993300;
margin-bottom: 30px;
font-size: 64px;
font-weight: 700;
}
#intro .intro-content h2 span {
color: #993300;
text-decoration: underline;
}
#intro .intro-content .btn-get-started,
#intro .intro-content .btn-projects {
font-family: "Raleway", sans-serif;
font-size: 15px;
font-weight: bold;
letter-spacing: 1px;
display: inline-block;
padding: 10px 32px;
border-radius: 2px;
transition: 0.5s;
margin: 10px;
color: #fff;
}
#intro .intro-content .btn-get-started {
background: #993300;
border: 2px solid #993300;
}
#intro .intro-content .btn-get-started:hover {
background: none;
color: #993300;
}
#intro .intro-content .btn-projects {
background: #993300;
border: 2px solid #993300;
}
#intro .intro-content .btn-projects:hover {
background: none;
color: #993300;
}
#intro #intro-carousel {
z-index: 8;
}
#intro #intro-carousel::before {
content: '';
background-color: );
position: absolute;
height: 100%;
width: 100%;
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 7;
}
#intro #intro-carousel .item {
width: 100%;
height: 60vh;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
transition-property: opacity;
}
/*--------------------------------------------------------------
# Navigation Menu
--------------------------------------------------------------*/
/* Nav Menu Essentials */
.nav-menu,
.nav-menu * {
margin: 0;
padding: 0;
list-style: none;
}
.nav-menu>li>.dropdown-menu {
background-color: #fff4e9;
}
.nav-menu>li>.dropdown-item {
background-color: #fff4e9;
}
.dropdown-menu>li>a:hover {
background-color: #fff4e9;
background-image: none;
}
.nav-menu ul {
position: absolute;
display: none;
top: 100%;
left: 0;
z-index: 99;
}
.nav-menu li {
position: relative;
white-space: nowrap;
}
.nav-menu>li {
float: left;
}
.nav-menu li:hover>ul,
.nav-menu li.sfHover>ul {
display: block;
}
.nav-menu ul ul {
top: 0;
left: 100%;
}
.nav-menu ul li {
min-width: 180px;
}
/* Nav Menu Arrows */
.sf-arrows .sf-with-ul {
padding-right: 22px;
}
.sf-arrows .sf-with-ul:after {
content: "\f107";
position: absolute;
right: 8px;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
}
.sf-arrows ul .sf-with-ul:after {
content: "\f105";
}
/* Nav Meu Container */
#nav-menu-container {
float: right;
margin: 0;
}
/* Nav Meu Styling */
.nav-menu a {
padding: 10px 8px;
text-decoration: none;
display: inline-block;
color: #555;
font-family: "Raleway", sans-serif;
font-weight: 700;
font-size: 14px;
outline: none;
}
.nav-menu li:hover>a,
.nav-menu .menu-active>a {
color: #993300;
}
.nav-menu>li {
margin-left: 10px;
}
.nav-menu ul {
margin: 4px 0 0 0;
padding: 10px;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
background: #fff;
}
.nav-menu ul li {
transition: 0.3s;
}
.nav-menu ul li a {
padding: 10px;
color: #333;
transition: 0.3s;
display: block;
font-size: 13px;
text-transform: none;
}
.nav-menu ul li:hover>a {
color: #993300;
}
.nav-menu ul ul {
margin: 0;
}
/* Mobile Nav Toggle */
#mobile-nav-toggle {
position: fixed;
right: 0;
top: 0;
z-index: 999;
margin: 20px 20px 0 0;
border: 0;
background: none;
font-size: 24px;
display: none;
transition: all 0.4s;
outline: none;
cursor: pointer;
}
#mobile-nav-toggle i {
color: #555;
}
/* Mobile Nav Styling */
#mobile-nav {
position: fixed;
top: 0;
padding-top: 18px;
bottom: 0;
z-index: 998;
background: rgba(52, 59, 64, 0.9);
left: -260px;
width: 260px;
overflow-y: auto;
transition: 0.4s;
}
#mobile-nav ul {
padding: 0;
margin: 0;
list-style: none;
}
#mobile-nav ul li {
position: relative;
}
#mobile-nav ul li a {
color: #fff;
font-size: 16px;
overflow: hidden;
padding: 10px 22px 10px 15px;
position: relative;
text-decoration: none;
width: 100%;
display: block;
outline: none;
}
#mobile-nav ul li a:hover {
color: #fff;
}
#mobile-nav ul li li {
padding-left: 30px;
}
#mobile-nav ul .menu-has-children i {
position: absolute;
right: 0;
z-index: 99;
padding: 15px;
cursor: pointer;
color: #fff;
}
#mobile-nav ul .menu-has-children i.fa-chevron-up {
color: #993300;
}
#mobile-nav ul .menu-item-active {
color: #993300;
}
#mobile-body-overly {
width: 100%;
height: 100%;
z-index: 997;
top: 0;
left: 0;
position: fixed;
background: rgba(52, 59, 64, 0.9);
display: none;
}
/* Mobile Nav body classes */
body.mobile-nav-active {
overflow: hidden;
}
body.mobile-nav-active #mobile-nav {
left: 0;
}
body.mobile-nav-active #mobile-nav-toggle {
color: #fff;
}
/*--------------------------------------------------------------
# Sections
--------------------------------------------------------------*/
/* Sections Header
--------------------------------*/
.section-header {
margin-bottom: 30px;
}
.section-header h2 {
font-size: 32px;
color: #993300;
text-transform: uppercase;
font-weight: 700;
position: relative;
padding-bottom: 20px;
}
.section-header h3 {
font-size: 26px;
color: #993300;
text-transform: uppercase;
font-weight: 700;
position: relative;
padding-bottom: 20px;
}
.section-header h2::before {
content: '';
position: absolute;
display: block;
width: 50px;
height: 3px;
background: #993300;
bottom: 0;
left: 0;
}
.section-header h3::before {
content: '';
position: absolute;
display: block;
width: 50px;
height: 3px;
background: #993300;
bottom: 0;
left: 0;
}
.section-header p {
padding: 0;
margin: 0;
}
/* About Section
--------------------------------*/
#about {
padding: 60px 0 30px 0;
}
#about .about-img {
overflow: hidden;
}
#about .about-img img {
margin-left: -15px;
max-width: 100%;
}
#about .content h2 {
color: #993300;
font-weight: 700;
font-size: 36px;
font-family: "Raleway", sans-serif;
}
#about .content h3 {
color: #555;
font-weight: 300;
font-size: 18px;
line-height: 26px;
font-style: italic;
}
#about .content p {
line-height: 26px;
}
#about .content p:last-child {
margin-bottom: 0;
}
#about .content i {
font-size: 20px;
padding-right: 4px;
color: #993300;
}
#about .content ul {
list-style: none;
padding: 0;
}
#about .content ul li {
padding-bottom: 10px;
}
/* Services Section
--------------------------------*/
#services {
padding: 30px 0 0 0;
}
#services .box {
padding: 40px;
margin-bottom: 40px;
box-shadow: 10px 10px 15px rgba(73, 78, 92, 0.1);
background: #fff4e9;
transition: 0.4s;
}
#services .box:hover {
box-shadow: 0px 0px 30px rgba(73, 78, 92, 0.15);
transform: translateY(-10px);
-webkit-transform: translateY(-10px);
-moz-transform: translateY(-10px);
}
#services .box .icon {
float: left;
}
#services .box .icon i {
color: #444;
font-size: 64px;
transition: 0.5s;
line-height: 0;
margin-top: 34px;
}
#services .box .icon i:before {
background: #993300;
background: linear-gradient(45deg, #993300 0%, #993300 100%);
background-clip: border-box;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
#services .box h4 {
margin-left: 100px;
font-weight: 700;
margin-bottom: 15px;
font-size: 22px;
}
#services .box h4 a {
color: #444;
}
#services .box p {
font-size: 14px;
margin-left: 100px;
margin-bottom: 0;
line-height: 24px;
}
/* Clients Section
--------------------------------*/
#clients {
padding: 30px 0;
}
#clients img {
max-width: 100%;
opacity: 0.5;
transition: 0.3s;
padding: 15px 0;
}
#clients img:hover {
opacity: 1;
}
#clients .owl-nav,
#clients .owl-dots {
margin-top: 5px;
text-align: center;
}
#clients .owl-dot {
display: inline-block;
margin: 0 5px;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ddd;
}
#clients .owl-dot.active {
background-color: #993300;
}
/* Our Portfolio Section
--------------------------------*/
#portfolio {
background: #fff4e9;
padding: 30px 0;
}
#portfolio .portfolio-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 1;
transition: all ease-in-out 0.4s;
}
#portfolio .portfolio-item {
overflow: hidden;
position: relative;
padding: 0;
vertical-align: middle;
text-align: center;
}
#portfolio .portfolio-item h2 {
color: #ffffff;
font-size: 24px;
margin: 0;
text-transform: capitalize;
font-weight: 700;
}
#portfolio .portfolio-item img {
transition: all ease-in-out 0.4s;
width: 100%;
}
#portfolio .portfolio-item:hover img {
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
#portfolio .portfolio-item:hover .portfolio-overlay {
opacity: 1;
background: rgba(0, 0, 0, 0.7);
}
#portfolio .portfolio-info {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
/* Testimonials Section
--------------------------------*/
#testimonials {
padding: 30px 0;
}
#testimonials .testimonial-item {
box-sizing: content-box;
padding: 30px 30px 0 30px;
margin: 30px 15px;
text-align: center;
min-height: 350px;
box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.08);
}
#testimonials .testimonial-item .testimonial-img {
width: 90px;
border-radius: 50%;
border: 4px solid #fff;
margin: 0 auto;
}
#testimonials .testimonial-item h3 {
font-size: 18px;
font-weight: bold;
margin: 10px 0 5px 0;
color: #111;
}
#testimonials .testimonial-item h4 {
font-size: 14px;
color: #999;
margin: 0;
}
#testimonials .testimonial-item .quote-sign-left {
margin-top: -15px;
padding-right: 10px;
display: inline-block;
width: 37px;
}
#testimonials .testimonial-item .quote-sign-right {
margin-bottom: -15px;
padding-left: 10px;
display: inline-block;
max-width: 100%;
width: 37px;
}
#testimonials .testimonial-item p {
font-style: italic;
margin: 0 auto 15px auto;
}
#testimonials .owl-nav,
#testimonials .owl-dots {
margin-top: 5px;
text-align: center;
}
#testimonials .owl-dot {
display: inline-block;
margin: 0 5px;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ddd;
}
#testimonials .owl-dot.active {
background-color: #993300;
}
/* Call To Action Section
--------------------------------*/
#call-to-action {
background: #081e5b;
background-size: cover;
padding: 40px 0;
}
#call-to-action .cta-title {
color: #fff;
font-size: 28px;
font-weight: 700;
}
#call-to-action .cta-text {
color: #fff;
}
#call-to-action .cta-btn {
font-family: "Montserrat", sans-serif;
font-weight: 700;
font-size: 16px;
letter-spacing: 1px;
display: inline-block;
padding: 8px 26px;
border-radius: 3px;
transition: 0.5s;
margin: 10px;
border: 3px solid #fff;
color: #fff;
}
#call-to-action .cta-btn:hover {
background: #993300;
border: 3px solid #993300;
}
/* Our Team Section
--------------------------------*/
#team {
background: #fff;
padding: 30px 0 0 0;
}
#team .member {
text-align: center;
margin-bottom: 20px;
}
#team .member .pic {
overflow: hidden;
text-align: center;
}
#team .member .pic img {
max-width: 100%;
}
#team .member .details {
background: #993300;
color: #fff;
padding: 15px;
border-radius: 0 0 3px 3px;
}
#team .member h4 {
font-weight: 700;
margin-bottom: 2px;
font-size: 18px;
}
#team .member span {
font-style: italic;
display: block;
font-size: 13px;
}
#team .member .social {
margin-top: 5px;
}
#team .member .social a {
color: #fff;
}
#team .member .social i {
font-size: 16px;
margin: 0 2px;
}
/* Contact Section
--------------------------------*/
#contact {
padding: 30px 0;
}
#contact .contact-info {
margin-bottom: 20px;
text-align: center;
}
#contact .contact-info i {
font-size: 48px;
display: inline-block;
margin-bottom: 10px;
color: #993300;
}
#contact .contact-info address,
#contact .contact-info p {
margin-bottom: 0;
color: #000;
}
#contact .contact-info h3 {
font-size: 18px;
margin-bottom: 15px;
font-weight: bold;
text-transform: uppercase;
color: #999;
}
#contact .contact-info a {
color: #000;
}
#contact .contact-info a:hover {
color: #993300;
}
#contact .contact-address,
#contact .contact-phone,
#contact .contact-email {
margin-bottom: 20px;
}
#contact #google-map {
height: 290px;
margin-bottom: 20px;
}
#contact .form #sendmessage {
color: #993300;
border: 1px solid #993300;
display: none;
text-align: center;
padding: 15px;
font-weight: 600;
margin-bottom: 15px;
}
#contact .form #errormessage {
color: red;
display: none;
border: 1px solid red;
text-align: center;
padding: 15px;
font-weight: 600;
margin-bottom: 15px;
}
#contact .form #sendmessage.show,
#contact .form #errormessage.show,
#contact .form .show {
display: block;
}
#contact .form .validation {
color: red;
display: none;
margin: 0 0 20px;
font-weight: 400;
font-size: 13px;
}
#contact .form input,
#contact .form textarea {
padding: 10px 14px;
border-radius: 0;
box-shadow: none;
font-size: 15px;
}
#contact .form button[type="submit"] {
background: #993300;
border: 0;
border-radius: 3px;
padding: 10px 30px;
color: #fff;
transition: 0.4s;
cursor: pointer;
}
#contact .form button[type="submit"]:hover {
background: #2dc899;
}
/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
#footer {
background: #fff4e9;
padding: 0 0 30px 0;
font-size: 14px;
}
#footer .copyright {
text-align: center;
padding-top: 30px;
}
#footer .credits {
text-align: center;
font-size: 13px;
color: #555;
}
#footer .credits a {
color: #993300;
}
#media (min-width: 768px) {
#contact .contact-address,
#contact .contact-phone,
#contact .contact-email {
padding: 20px 0;
}
#contact .contact-phone {
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}
}
#media (min-width: 769px) {
#call-to-action .cta-btn-container {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: end;
-webkit-justify-content: flex-end;
-ms-flex-pack: end;
justify-content: flex-end;
}
}
#media (max-width: 768px) {
.back-to-top {
bottom: 15px;
}
#header {
padding: 20px 0;
height: 74px;
}
#header #logo h1 {
font-size: 34px;
}
#header #logo img {
max-height: 40px;
}
#nav-menu-container {
display: none;
}
#mobile-nav-toggle {
display: inline;
}
#about .about-img {
height: auto;
}
#about .about-img img {
margin-left: 0;
padding-bottom: 30px;
}
}
#media (max-width: 767px) {
#intro .intro-content h2 {
font-size: 34px;
}
#services .box .box {
margin-bottom: 20px;
}
#services .box .icon {
float: none;
text-align: center;
padding-bottom: 15px;
}
#services .box h4,
#services .box p {
margin-left: 0;
text-align: center;
}
#testimonials .testimonial-item {
margin: 30px 10px;
}
}
#media (max-width: 576px) {
#contact #google-map {
margin-top: 20px;
}
}
#thumbnails {
display: block;
margin-bottom: 10px;
}
#thumbnails ul li {
float: left;
margin-right: 12px;
margin-left: 12px;
margin-bottom: 12px;
}
<nav id="nav-menu-container">
<ul class="nav-menu">
<li class="menu-active">Home</li>
<li>About us</li>
<li class="dropdown">
<a class="dropdown-item">Services</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="page1.html">page1</a></li>
<li><a class="dropdown-item" href="page2.html">page2</a></li>
</ul>
<li>page3</li>
<li>page4</li>
</ul>
</nav>
The answers are right in front of you! #MattOpen sent you the Bootstrap nav components.
I am not going to do the work for you as you stated you was new to this so the best way to learn is to just get stuck in! make a copy so you can always revert and test.
Have a little look at this code below and then play around with you CSS :)`
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="index.html">Home<span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Services
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="page1.html">Dropdown Page 1</a>
<a class="dropdown-item" href="page2.html">Dropdwon Page 2</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="page3.html">page 3</a>
</li>
<li class="nav-item">
<a class="nav-link" href="page4.html">page 4</a>
</li>
</ul>
</div>
`
Hey Friends I noticed that the background image doesn't stretch the whole width of the screen when I set the screen width to 2560px, which is a standard desktop screen size I assume. I'm not sure though this is the first time I've done media queries. I also don't know how to upload images on here or Imgur so you can see it in action. So here's a pic
https://jsfiddle.net/khcwnm90/
Also so the code posted on SO is just so I can post the fiddle link. I think its pretty stupid that I have to do this because the only reason I'm posting the fiddle link is because I have too much code to post here.
body, html {
margin: 0;
padding: 0;
}
/*---HEADER---*/
li a {
text-decoration-line: none;
color: rgba(102,102,102,0.75);
}
header {
background-image: url(../img/wall2.jpeg);
height: 100vh;
background-attachment: fixed;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: center;
}
nav {
background-color: white;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
top: 0;
left: 0;
z-index: 2;
box-shadow: 0px 0px 100px grey;
}
ul {
margin-right: 30px;
margin-top: 25px;
}
li {
display: inline-block;
font-size: 1.55rem;
margin-right: 20px;
font-family: 'Rajdhani';
}
li a:hover {
cursor: pointer;
color: #1a1a1a;
transition: all 0.7s ease;
}
.after:after {
position: relative;
left: 12px;
top: 2px;
display: inline-block;
content: "";
width: 1px;
height: 20px;
background-color: rgba(102,102,102,0.25);
}
.logo { color: red;
font-size: 3.7rem;
margin: 10px;
opacity: 1;
margin-left: 30px;
}
.phrase {
text-align: center;
}
.phrase p {
color: white;
font-size: 3.5rem;
font-family: 'Arvo';
margin-bottom: 30px;
}
.phrase a {
background-color: red;
border-radius: 25px;
color: white;
font-family: 'Bitter';
font-size: 1.8rem;
padding-left: 15px;
padding-right: 15px;
padding-bottom: 10px;
padding-top: 10px;
transition: all 0.2s ease;
}
.phrase a:hover {
transition: all 0.5s ease;
background-color: #cc0000;
cursor: pointer;
}
.phrase .fas {
display: block;
color: white;
font-size: 3.5rem;
margin-top: 15px;
}
/*---PROMISE---*/
.stats {
width: 100%;
display: flex;
box-shadow: 0px 0px 150px grey;
position: relative;
z-index: 1;
background-color: white;
}
.stats div {
display: inline-block;
flex-basis: 35%;
text-align: center;
padding-bottom: 30px;
}
.stat-info {
font-size: 2rem;
color: rgba(102,102,102, 1);
font-family: 'Rajdhani';
margin-bottom: 0;
margin-top: 10px;
}
.stat-num {
color: red;
font-family: 'Rajdhani';
font-size: 3rem;
margin: 0;
font-weight: bolder;
}
.stats div:before {
display: inline-block;
content: '';
width: 2px;
height: 35px;
background-color: rgba(102,102,102, 0.60);
}
.promise {
width: 100%;
background-image: url('../img/concrete.jpg');
background-position: center;
background-attachment: fixed;
background-size: cover;
}
.promise .wrapper {
width: 100%;
background-color: rgba(0, 0, 0, 0.3);
}
.promise h1 {
position: relative;
top: 40px;
color: white;
font-family: 'Arvo';
font-size: 3.5rem;
text-align: center;
margin-top: 0;
word-spacing: 7px;
text-shadow: 0px 0px 100px grey;
}
.promise p {
color: white;
font-size: 1.8rem;
font-family: 'Rajdhani';
margin-bottom: 0;
padding-bottom: 60px;
text-align: center;
margin-top: 40px;
padding-left: 50px;
padding-right: 50px;
}
/*---FOOTER---*/
.footer .wrapper {
display: flex;
}
.footer div {
display: inline-block;
flex-basis: 33.33%;
font-family: 'Rajdhani';
color: rgba(102,102,102, 1);
margin-top: 5px;
}
.footer h1 {
font-size: 2rem;
margin-top: 15px;
}
.footer .inner {
margin-left: 55px;
}
.social .inner {
margin-left: 45px;
}
.contact .inner {
margin-left: 35px;
}
.footer .inner:before {
display: inline-block;
content: '';
width: 27.1%;
height: 2px;
background-color: rgba(102,102,102, 0.6);
position: absolute;
margin-top: 54px;
}
.footer h1 span {
display: inline;
position: relative;
}
.footer h1 span:after {
content: '';
height: 2px;
width: 100%;
background-color: red;
position: absolute;
bottom: 0;
left: 0;
}
.wrap:before {
content: '';
width: 100px;
height: 2px;
background-color: red;
position: absolute;
margin-top: 55px;
}
.links a {
display: block;
text-decoration-line: none;
color: rgba(102,102,102, 1);
font-size: 1.2rem;
position: relative;
top: -10px;
transition: color 0.4s ease;
}
.links a:hover {
color: red;
}
.contact p {
position: relative;
top: -10px;
}
.social i {
font-size: 1.7rem;
margin-right: 5px;
position: relative;
top: -20px;
color: rgba(102,102,102, 0.7);
transition: all 0.4s ease;
}
.social i:hover {
color: red;
cursor: pointer;
}
#msg {
margin-top: -15px;
}
.footer-textarea {
background-color: rgba(102,102,102, 0.2);
outline: none;
color: rgba(102,102,102, 1);
resize: none;
width: 89%;
}
.footer button {
float: right;
margin-right: 9.5%;
margin-top: -17px;
border: none;
font-family: 'Rajdhani';
font-size: 1.2rem;
transition: all ease 0.4s;
outline: none;
}
button:hover {
cursor: pointer;
color: red;
}
.dark {
color: red;
}
.copyright {
position: absolute;
background-color: white;
text-align: center;
width: 100%;
margin-bottom: 0;
font-size: 1.2rem;
padding-bottom: 4px;
}
/*-------MEDIA QUERIES-------*/
/*---LAPTOP-LARGE---*/
#media screen and (min-width: 1440px) {
/*---FOOTER---*/
.footer button {
margin-left: 16.5%;
}
}
/*---LAPTOP---*/
#media screen and (max-width: 1024px) {
/*---NAV---*/
.logo {
font-size: 3rem;
}
nav li {
font-size: 2rem;
}
/*---MAIN---*/
header {
height: 100vh;
}
.phrase p {
font-size: 3rem;
}
.phrase a {
font-size: 1.5rem;
}
.stats p {
font-size: 2rem;
}
/*---FOOTER---*/
.footer .inner {
margin-left: 30px;
}
.footer-textarea {
width: 88%;
}
.footer button {
margin-right: 10.25%;
}
.footer h1 span {
display: inline;
position: relative;
}
.footer h1 span:after {
content: '';
height: 2px;
width: 100%;
background-color: red;
position: absolute;
bottom: 0;
left: 0;
}
}
#media screen and (max-width: 1024px) and (min-height: 1366px) {
/*---MAIN---*/
header {
height: 80vh;
}
}
#media screen and (max-width: 823px) {
/*---MAIN---*/
.phrase p {
font-size: 3rem;
}
}
/*------LANDSCAPE-MODE------*/
#media screen and (max-width: 812px) {
/*---NAV---*/
nav li {
font-size: 1.7rem;
}
.logo {
font-size: 2.7rem;
}
/*---MAIN---*/
header {
height: 100vh;
}
.stats p {
font-size: 2rem;
}
.promise p {
font-size: 1.3rem;
}
/*---FOOTER---*/
.footer button {
margin-left: 8.5%;
}
.contact .inner {
margin-right: 20px;
}
}
/*---TABLET---*/
#media screen and (max-width: 768px) {
/*---NAV---*/
nav li {
font-size: 1.6rem;
}
.logo {
font-size: 3rem;
}
/*---MAIN---*/
.phrase {
top: 300px;
}
/*---FOOTER---*/
.footer h1 span {
display: inline;
position: relative;
}
.footer h1 span:after {
content: '';
height: 2px;
width: 100%;
background-color: red;
position: absolute;
bottom: 0;
left: 0;
}
.footer button {
margin-left: 7.4%;
}
}
#media screen and (max-width: 731px) {
/*---FOOTER---*/
.footer button {
margin-left: 6%;
}
.contact .inner p {
margin: 5px;
}
}
/*------LANDSCAPE-MODE-MOBILE------*/
#media screen and (max-width: 715px) {
/*---NAV---*/
.phrase {
margin-top: 30px;
}
.phrase p {
font-size: 2.5rem;
}
.phrase a {
font-size: 1.5rem;
}
nav ul {
padding-left: 0;
margin: 0;
}
nav li {
font-size: 1.4rem;
}
nav .logo {
font-size: 2.5rem;
}
/*---FOOTER---*/
.links a {
font-size: 1.1rem;
top: -13px;
}
.contact .inner {
margin-right: 15px;
}
.contact p {
margin: 5px;
}
.footer-textarea {
position: relative;
top: -5px;
width: 90.5%;
}
.footer button {
margin-top: -18px;
margin-right: 7%;
font-size: 1.1rem;
}
}
#media screen and (max-width: 586px) {
/*---MAIN---*/
.phrase p {
font-size: 2.7rem;
}
.stats p {
font-size: 1.5rem;
}
/*---FOOTER---*/
.footer .wrapper {
display: flex;
flex-direction: column;
}
.footer div {
margin: 0;
}
.footer h1 {
font-size: 2rem;
margin-top: 10px;
}
.footer .inner {
margin: 0;
}
.footer .inner:before {
display: inline-block;
content: '';
width: 100vw;
height: 2px;
background-color: rgba(102,102,102, 0.6);
position: absolute;
margin-top: 48px;
}
.footer h1 span:after {
content: '';
height: 2px;
width: 100%;
background-color: red;
position: absolute;
bottom: 1px;
left: 0;
}
.social .inner {
position: relative;
top: -10px;
}
.links a {
margin-left: 5px;
}
.social h1 {
margin-bottom: 10px;
}
#msg {
font-size: 1rem;
margin-bottom: 0;
margin-right: 25.5%;
position: absolute;
right: 5px;
top: 80px;
}
.footer button {
right: 9.25%;
margin-top: 0.2px;
}
.social i {
font-size: 1.8rem;
margin-right: 2px;
position: relative;
top: -5px;
left: 5px;
color: rgba(102,102,102, 0.7);
transition: all 0.4s ease;
}
.footer-textarea {
width: 88.5%;
margin-top: 25px;
margin-left: 5px;
}
.contact p {
margin: 5px;
font-size: 1.2rem;
}
.copyright {
background-color: red;
padding-top: 10px;
padding-bottom: 10px;
}
.copyright span {
color: white;
background-color: red;
}
}
#media screen and (max-width: 568px) {
/*---MAIN---*/
.phrase p {
font-size: 2rem;
}
.phrase a {
font-size: 1.3rem;
}
.stats p {
font-size: 1.5rem;
}
.promise p {
font-size: 1.3rem;
}
/*---FOOTER---*/
.footer .wrapper {
display: flex;
flex-direction: column;
}
.footer div {
margin: 0;
}
.footer h1 {
font-size: 2rem;
margin-top: 10px;
}
.footer .inner {
margin: 0;
}
.footer .inner:before {
display: inline-block;
content: '';
width: 100%;
height: 2px;
background-color: rgba(102,102,102, 0.6);
position: absolute;
margin-top: 48px;
}
.footer h1 span:after {
content: '';
height: 2px;
width: 100%;
background-color: red;
position: absolute;
bottom: 1px;
left: 0;
}
.social .inner {
position: relative;
top: -10px;
}
.social .inner:before {
width: 100vw;
}
.links a {
margin-left: 5px;
}
.social h1 {
margin-bottom: 10px;
}
#msg {
font-size: 1rem;
margin-bottom: 0;
margin-right: 25.5%;
position: absolute;
right: 5px;
top: 80px;
}
.footer button {
right: 9.25%;
margin-top: 0.2px;
}
.social i {
font-size: 1.8rem;
margin-right: 2px;
position: relative;
top: -5px;
left: 5px;
color: rgba(102,102,102, 0.7);
transition: all 0.4s ease;
}
.footer-textarea {
width: 88.5%;
margin-top: 30px;
margin-left: 5px;
}
.contact p {
margin: 5px;
font-size: 1.2rem;
}
.copyright {
background-color: red;
}
.copyright span {
color: white;
background-color: red;
}
}
#media screen and (max-width: 517px) {
/*---NAV---*/
nav li {
font-size: 1.1rem;
}
/*---MAIN---*/
header h1 {
font-size: 3rem;
}
/*---FOOTER---*/
.footer .wrapper {
display: flex;
flex-direction: column;
}
.footer div {
margin: 0;
}
.footer h1 {
font-size: 2rem;
margin-top: 10px;
}
.footer .inner {
margin: 0;
}
.footer .inner:before {
display: inline-block;
content: '';
width: 100vw;
height: 2px;
background-color: rgba(102,102,102, 0.6);
position: absolute;
margin-top: 48px;
}
.social .inner {
position: relative;
top: -10px;
}
.footer h1 span:after {
content: '';
height: 2px;
width: 100%;
background-color: red;
position: absolute;
bottom: 1px;
left: 0;
}
.links a {
margin-left: 5px;
}
.social h1 {
margin-bottom: 10px;
}
#msg {
font-size: 1.3rem;
margin-bottom: 0;
float: right;
margin-right: 25.5%;
position: relative;
top: 15px;
}
.footer button {
right: 9.25%;
margin-top: 0.2px;
}
.social i {
font-size: 1.8rem;
margin-right: 7px;
position: relative;
top: -5px;
left: 5px;
color: rgba(102,102,102, 0.7);
transition: all 0.4s ease;
}
.footer-textarea {
width: 88.5%;
margin-left: 5px;
margin-top: 0px;
position: relative;
top: 10px;
}
.contact p {
margin: 5px;
font-size: 1.2rem;
}
.copyright {
background-color: red;
}
.copyright span {
color: white;
background-color: red;
}
}
/*---MOBILE---*/
#media screen and (max-width: 425px) {
/*---NAV---*/
.logo {
font-size: 2.5rem;
margin-left: 10px;
}
ul {
margin: 0;
padding: 0;
}
nav li {
display: none;
}
.ham-menu {
width: 55px;
height: 55px;
position: fixed;
right: 0;
top: 4px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.m1, .m2, .m3 {
border-radius: 4px;
margin: 4px;
width: 35px;
height: 3px;
background-color: red;
float: left;
animation-duration: 0.3s;
animation-fill-mode: forwards;
}
/*---MAIN---*/
.phrase {
top: 179px;
}
.phrase p {
font-size: 2.5rem;
margin-bottom: 10px;
}
.phrase a {
font-size: 1.3rem;
padding: 7px;
}
.phrase .fas {
margin-top: 10px;
font-size: 2.5rem;
}
.stats p {
font-size: 1.3rem;
}
.stats div {
padding-bottom: 10px;
}
.stats div:before {
height: 20px;
}
.promise h1 {
font-size: 2.7rem;
}
.promise p {
position: relative;
top: 10px;
font-size: 1.3rem;
}
/*---FOOTER---*/
.footer .wrapper {
display: flex;
flex-direction: column;
}
.footer div {
margin: 0;
}
.footer h1 {
font-size: 2rem;
margin-top: 10px;
}
.footer .inner {
margin: 0;
}
.footer .inner:before {
display: inline-block;
content: '';
width: 100vw;
height: 2px;
background-color: rgba(102,102,102, 0.6);
position: absolute;
margin-top: 48px;
}
.social .inner {
position: relative;
top: -9.5px;
}
.footer h1 span {
display: inline;
position: relative;
}
.footer h1 span:after {
content: '';
height: 2px;
width: 100%;
background-color: red;
position: absolute;
bottom: 1px;
left: 0;
}
.links a {
margin-left: 5px;
}
.social h1 {
margin-bottom: 10px;
}
#msg {
font-size: 1rem;
margin-bottom: 0;
margin-right: 25.5%;
position: absolute;
right: 5px;
top: 80px;
}
.footer button {
right: 9.25%;
margin-top: 0.2px;
}
.social i {
font-size: 1.8rem;
margin-right: 2px;
position: relative;
top: -5px;
left: 5px;
color: rgba(102,102,102, 0.7);
transition: all 0.4s ease;
}
.footer-textarea {
width: 88.5%;
margin-top: 0px;
margin-left: 5px;
}
.contact p {
margin: 5px;
font-size: 1.2rem;
}
.copyright {
background-color: red;
}
.copyright span {
color: white;
background-color: red;
}
}
#media screen and (max-width: 360px) {
.footer button {
margin-right: 8.5%;
}
}
/*---HAM-MENU-ANIMATIONS---*/
#keyframes m1 {
from {
border-radius: 4px;
margin: 4px;
width: 35px;
height: 3px;
background-color: red;
float: left;
}
to {
border-radius: 4px;
margin: 4px;
width: 35px;
height: 3px;
background-color: red;
float: left;
transform: rotate(45deg);
position: relative;
top: 12px;
}
}
#keyframes m2 {
from {
border-radius: 4px;
margin: 4px;
width: 35px;
height: 3px;
background-color: red;
float: left;
}
to {
border-radius: 4px;
margin: 4px;
width: 35px;
height: 3px;
background-color: red;
float: left;
opacity: 0;
}
}
#keyframes m3 {
from {
border-radius: 4px;
margin: 4px;
width: 35px;
height: 3px;
background-color: red;
float: left;
}
to {
border-radius: 4px;
margin: 4px;
width: 35px;
height: 3px;
background-color: red;
float: left;
transform: rotate(-45deg);
position: relative;
top: -10.5px;
}
}
New rule for .header, remove background-attachment: fixed; and add background-size: cover;:
header {
background-image: url(../img/wall2.jpeg);
height: 100vh;
background-size: cover;
background-repeat: no-repeat;
display: flex;
justify-content: center;
align-items: center;
}
You have the picture in the header and it seems like you only edited the height and not the width. Im not sure about the specs of the picture which might come out stretched but try putting this...
width: 100%;
in the style section you put the picture in . . . (header {})
if you are going to have that image as just the header then you should probably limit it to only a portion of the height but the full width. Its a lot easier to use percentages as much as you can because of the transition from mobile to desktop. When a user looks at a web page from their phone and its in pixels then it would be a lot large than they would probably like.
Use background-size: cover, it will stretch an image to fill the full size of your element.
<body style="background-image:url(bgimage.jpg)"> use this code
and then check.
Update:
I'm sure this will be easy fix for advanced members. I have created drop down menu with the 'nav' element. For some reason as hard as I try, I cannot get the menu to overlap the slider images below it when you expand it on mobile. I've tried lowering the Z-index on the slider and raising it on the menu. What am I doing wrong? Thanks in advance:
UPDATE: Here is a fiddle link as requested by a comment which includes the HTML. https://jsfiddle.net/wknow6cv/#&togetherjs=ADxkd31O6q
#import 'https://fonts.googleapis.com/css?family=Alegreya+Sans';
* {
margin: 0;
padding: 0;
border: 0;
overflow-x: hidden;
}
html,body
{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
body {
background: #F5F5F5;
color: #67727A;
font-family: 'Alegreya', Sans-serrif;
margin: 0;
}
h3 {
font-size: 150%;
line-height: 155%;
padding: 5% 0;
font-weight: 400;
}
p{
font-size: 120%;
line-height: 150%;
padding: 3%;
text-indent: 2%;
text-align: center;
}
img{
max-width: 100%;
height: auto;
width: auto;
margin-bottom: -4px;
}
header{
background-color: #6991AC;
width: 100%;
height: 120px;
}
h1{
position:absolute;
right: 600px;
top:30px;
}
#top-left-menu {
right: 0px;
}
#logo{
margin: 20px;
float: left;
width: 380px;
height: 60px;
background: url(img/RD.png) no-repeat center;
left: 0px;
top: 0px;
}
p {
font-size: 1.4vw;
}
h3{
font-size: 1.5vw;
}
/*--- Start Navigation --*/
nav{
float: right;
padding: 25px 20px 0 0; /*--top right bottom left--*/
}
#menu-icon{
display: hidden;
width: 40px;
height: 40px;
background: url(img/nav.png) center;
}
a:hover#menu-icon {
border-radius: 4px 4px 0 0;
}
ul{
list-style-type: none;
}
nav ul li {
font-family: 'Alegreya Sans', Sans-serrif;
font-size: 150%;
display: inline-block;
/*makes the links go left from right instead of up and down*/
float: left;
padding: 10px;
}
nav ul li a {
text-decoration: none;
color: #F5F5F5;
}
nav ul li a:hover {
color: #C3D7DF;
}
/*.current{
color: #C3D7DF;
}
/*--End Navigation--*/
.one-fourth {
width: 25%;
float: left;
text-align: center;
font-family: Arial;
color: #F0F0F0;
}
#cloud {
background-color: #C3D7DF;
}
#lock {
background-color: #6991AC;
}
#headset {
background-color: #C3D7DF;
}
#truck {
background-color: #6991AC;
}
.one-fourth i { /*--Icons at one fourth blocks--*/
color: #F0F0F0;
font-size: 410%;
padding: 13% 0 4% 0;
}
article {
float: left;
margin: 0 auto;
width: 50%;
height: auto;
}
#sec-1 {
background-color: #FFFFFF;
}
aside {
float: right;
margin: 0 auto;
width: 50%;
height: auto;
}
.one-third {
width: 33.3333333%;
float: left;
text-align: center;
color: #FFFFFF
}
#google{
background-color: #A2B1C1;
}
#marketing {
background-color: #BEB9AD;
}
#customers {
background-color: #AADCD2;
}
/*--Start Footer--*/
footer {
background-color: #4682B4;
width: 100%;
}
.social {
list-style-type: none;
text-align: center;
}
.social li {
display: inline;
}
.social i { /*--icons--*/
font-size: 220%;
padding: 3% 3% 3% 2%;
color: #C3D7DF;
}
.social i:hover {
color: F5F5F5;
}
footer.second { /*--Socket--*/
border-top: 1px solid #AADCD2;
background-color: #544B59;
max-height: 55px;
text-align: center;
margin: 0;
}
footer.second p {
padding: 5px 0 9px 0;
text-align: center;
}
.carouselbox {
font-family: helvetica,sans-serif;
font-size: 14px;
width: 100px;
position: relative;
margin: 1em;
border: 1px solid #ccc;
box-shadow: 2px 2px 10px #ccc;
overflow: hidden;
}
.content {
margin: 0;
padding: 0;
}
.content li {
font-size: 100px;
margin: 0;
padding: 0;
width: 100%;
list-style: none;
text-align: center;
}
.new-inner {
height: 800px;
width: 100%;
float: left;
background-color: #FFFAFA;
font-family: Arial;
}
.nip1 {
width: 40%;
}
/*---------Insert Slideshow stuff below------*/
.cycle-slideshow{
width: 100%;
display: block;
position: relative;
margin: 0 auto;
overflow: hidden;
}
.cycle-prev, .cycle-next {
font-size: 200%;
color: #FFF;
top: 50%;
display: block;
position: absolute;
z-index: 9999;
cursor: pointer;
}
.cycle-prev {left: 10%;}
.cycle-next {right: 10%}
.cycle-pager{
width: 100%;
text-align: center;
display: block;
position: absolute;
bottom: 20px;
z-index: 9999;
cursor: pointer;
}
.cycle-pager span {
text-indent: 100%;
white-space: normal;
width: 12px;
height: 12px;
display: inline-block;
border: 1px solid #FFF;
border-radius: 50%;
margin: 0 10px;
}
.cycle-pager .cycle-pager-active {background: #FFF;}
/*------------MEDIA QUERIES ARE NOW STARTING-------------*/
#media screen and (max-width: 768px){
p {
font-size: 250%;
}
h3{
font-size: 260%;
}
header{
width: 100%;
}
#logo {
margin: 15px 0 20 -25px;
background: url(img/RD_mobile.png) no-repeat center;
float: left;
width: 170px;
height: 60px;
}
#menu-icon {
display: inline-block;
}
nav ul, nav:active ul {
display: none;
z-index: 1000;
position: absolute;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}
nav:hover ul {
display: block;
}
nav li {
text-align: center;
width: 100%;
padding: 10px 0;
}
.one-fourth {
float: left;
width: 100%;
font-size: 30%;
}
.one-fourth i {
font-size: 500%;
padding: 4% 0 1% 0;
}
article {
width: 100%;
}
aside {
width: 100%;
}
.hand-mobile {
display: none;
}
.social i {
font-size: 100%;
}
}
Maybe try to change the media queries nav to position: relative;
EDIT:
Try this instead, change the display: none to inline:
nav ul, nav:active ul {
display: inline;
z-index: 1000;
position: relative;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}
I am trying to figure out how to center the logo image on my footer. I want it to be able to scale as the browser changes but stay inside the center. If anyone knows how I can fix this that would really help! Thank you! I really appreciate all of the help with this. I have figured it out now and I am good to go.
.msum {
position: absolute;
bottom: 5%;
width: 100%;
display: block;
width: 200px;
height: 50px;
}
/*Rest of Code*/
figure.stayssame {
width: 100%;
}
figure video {
width: 100%;
height: 80%;
}
p {
padding: 2%;
}
.video-txt {
position: absolute;
top: 30%;
z-index: 9;
color: #FFF;
width: 100%;
text-align: center;
font-size: 40px;
}
object {
position: absolute;
left: 0%;
top: -5%;
z-index: 10;
width: 15%;
}
/*ALL CODE FROM DESKTOP*/
figure.adjustable {
width: 29%;
}
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 100px;
/* bottom = footer height */
font-family: 'Inconsolata', monospace;
/*font-family: 'Courier New', sans-serif;*/
font-weight: 300;
font-size: 20px;
line-height: 1.4em;
}
.squish {
margin-right: 125px;
}
.text {
padding: 5px;
}
.button {
margin-bottom: 50px;
margin-left: 20%
}
header {
position: fixed;
z-index: 1000;
width: 100%;
top: 0px;
background-color: #670809;
height: 70px;
letter-spacing: 1px;
line-height: 55px;
padding: 9px;
word-spacing: 5px;
}
header,
h1,
h2 {
font-family: 'Orbitron', sans-serif;
}
.space {
padding: 5px;
color: white;
}
nav {
float: left;
width: 100%;
}
nav ul li.active a {
background-color: none;
color: white;
text-decoration: none;
}
nav ul li a:hover {
color: #00E3FF;
}
nav ul li a:visited {
text-decoration: none;
}
/*nav ul li a {
display:inline-block;
padding: 1 px;
color: #fff;
letter-spacing: 1 px;
text-decoration:none;
text-transform: uppercase;
margin: .55em;
font-size: 5 px;
float: right;
}
nav ul li.active a {
/*background-color: none;
color: white;
text-decoration:none;
}
a:hover {
/*background-color:none;
color:black;
background-color:#00E3FF;
}
nav ul li a:visited {
color:black;
text-decoration:none;
}
*/
form {
padding-left: 20%;
}
/* header tags */
h1 {
text-align: center;
color: #013397;
font-size: 40px;
padding-top: 50px;
}
h2 {
text-align: center;
color: #00E3FF;
font-size: 30px;
margin: 5px;
padding: 20px;
}
p {
text-align: left;
}
.clearfix:after {
content: " ";
display: block;
clear: both;
}
#box {
background-color: #94DBEC;
}
hr.style2 {
border-top: 3px double #00E3FF;
width: 300px
}
section {
width: 85%;
margin-left: auto;
margin-right: auto;
margin-top: 35px;
}
img.adjustable {
width: 100%;
max-width: 100%;
height: auto;
/* max-width: 400px;
max-height: 400px;*/
margin: 1em;
/*width: 90%;
margin:5%;*/
}
#inner {
height: 100px;
padding: 15px 0;
}
#container {
height: 100%;
}
.imgbox5 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox4 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox3 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox2 {
padding-right: 30px;
}
.imgbox {
padding-right: 30px;
padding-left: 0px;
}
#firstpara {
background-color: #5E5757;
color: white;
}
#secpara {
background-color: #5E5757;
color: white;
}
#thirdpara {
background-color: #5E5757;
color: white;
}
#fourthpara {
background-color: #5E5757;
color: white;
}
#primary {
background-color: #5E5757;
color: white;
}
#enroll {
margin: 0;
padding: 0;
}
/*section{
text-align: center;
width: 100%;
}*/
footer {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 100px;
padding-bottom: 2%;
background-color: #670809;
font-family: 'Inconsolata', monospace;
/* text */
padding-left: 10px;
padding-top: 15px;
color: #ffffff;
font-size: 15px;
text-align: center;
}
a {
color: white;
}
a,
a:active {
color: white;
text-decoration: none;
}
.side {
left-margin: 10px;
right-margin: 10px;
}
object {
position: absolute;
top: 350px;
left: 100px;
height: 100px;
width: 200px;
z-index: 2000;
}
#headline {
text-align: center;
position: absolute;
top: 10%;
left: 35%;
color: #00E3FF;
line-height: 20px;
font-family: 'Orbitron', sans-serif;
word-spacing: 1px;
font-size: 12px;
}
#value {
background-color: #5E5757;
color: white;
width: 90%;
margin-left: auto;
margin-right: auto;
margin-top: 2%;
}
#title {
color: white;
text-align: center;
padding-top: 10px;
}
img {
width: 100%;
display: block;
}
/*.img{
border-width:thick;
border-style:solid;
border-color:white;
}
.column-right{
float: right;
width: 30%;
padding: 1%;
}
.column-center{
display: inline-block;
width: 30%;
padding: 1%;
bottom: 18px;
}
.column-left{
float: left;file:///Volumes/MMG/webfix/video/techpic1.jpg
width: 30%;
padding: 1%;
}
#left-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
}
#middle-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
}
#right-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
padding-bottom:135px;
}
.more {
position: relative;
display:inline-block;
color:black;
font-weight: bold;
top: 20px;
right: 31px;
background-color:white;
border-bottom-left-radius: 10px;
padding: 6px;
margin: 9px;
width: 30%;
}
#button3, #button2{
color: black;
position:relative;
top: 36px;
right:36px;
}
#button1{
color:black;
position:relative;
top: 155px;
right:36px;
}
*/
/*NAV BAR*/
#import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
#import url("http://fonts.googleapis.com/css?family=Open+Sans:400,300");
html {
font-size: 62.5%;
font-family: 'Open Sans', sans-serif;
}
body {
font-size: 1.6rem;
min-height: 100vh;
}
h1 {
font-size: 3rem;
margin-bottom: 1rem;
}
h2 {
font-size: 1.6rem;
}
header {
position: relative;
}
main {
padding: 2rem;
}
/***************** NAVIGATION ********************/
nav ul {
display: flex;
flex-wrap: wrap;
margin: 0 auto;
background: #670809;
}
nav ul,
nav li {
flex: 1;
}
nav li:last-child {
border-bottom: none;
}
nav a {
text-decoration: none;
color: inherit;
display: block;
font-size: 1.8rem;
}
nav a:hover {
background:
/*#adacac*/
#555;
color: #fff;
}
nav li {
position: relative;
line-height: 50px;
color: #fff;
text-align: center;
}
nav input,
nav label {
display: none;
width: 36px;
height: 36px;
background: #555;
color: #fff;
text-align: center;
line-height: 36px;
font-size: 1.6rem;
border-radius: 4px;
}
nav label {
position: absolute;
top: 8px;
right: 8px;
transition: .4s;
}
nav label:hover {
cursor: pointer;
}
nav label:before {
font-family: FontAwesome;
font-size: 24px;
content: "\f0c9";
text-align: center;
}
/*************** MEDIA QUERIES *******************/
nav ul {
transform: translateY(0);
box-shadow: 0 0 5px rgba(0, 0, 0, .7);
transition: all .5s;
}
nav li {
flex: none;
width: 100%;
border-bottom: solid 1px #777;
}
nav input[type="checkbox"]:checked + ul {
transform: translateY(-100%);
width: 100%;
background: #999;
transition: all .5s;
}
nav label {
display: block;
}
nav input[type="checkbox"]:checked + ul li:nth-child(1) {
background: #777;
color: #fff;
}
#css-toggle-menu {
float: right;
margin: 10px;
}
<footer>
<a id="enroll" href="https://www.mnstate.edu/eservices/"> Enroll Now</a>
<div class="text">
© 2016</div>
<br>
<img class="msum" src="https://www.mnstate.edu/uploadedImages/Content/Marketing/logos/MSUM_Signature_Horiz_Color.jpg?n=808" alt="msum logo" />
</footer>
.msum {
position: absolute;
bottom: 5%;
width: 100%;
display: block;
width: 200px;
height: 50px;
//add this
left: 0;
right: 0;
margin: 0 auto;
}
There's no need for position: absolute here. Do these to the img.msum:
Remove position: absolute;
Add margin: auto;
Snippet
.msum {
display: block;
width: 200px;
height: 50px;
margin: auto;
}
/*Rest of Code*/
figure.stayssame {
width: 100%;
}
figure video {
width: 100%;
height: 80%;
}
p {
padding: 2%;
}
.video-txt {
position: absolute;
top: 30%;
z-index: 9;
color: #FFF;
width: 100%;
text-align: center;
font-size: 40px;
}
object {
position: absolute;
left: 0%;
top: -5%;
z-index: 10;
width: 15%;
}
/*ALL CODE FROM DESKTOP*/
figure.adjustable {
width: 29%;
}
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 100px;
/* bottom = footer height */
font-family: 'Inconsolata', monospace;
/*font-family: 'Courier New', sans-serif;*/
font-weight: 300;
font-size: 20px;
line-height: 1.4em;
}
.squish {
margin-right: 125px;
}
.text {
padding: 5px;
}
.button {
margin-bottom: 50px;
margin-left: 20%
}
header {
position: fixed;
z-index: 1000;
width: 100%;
top: 0px;
background-color: #670809;
height: 70px;
letter-spacing: 1px;
line-height: 55px;
padding: 9px;
word-spacing: 5px;
}
header,
h1,
h2 {
font-family: 'Orbitron', sans-serif;
}
.space {
padding: 5px;
color: white;
}
nav {
float: left;
width: 100%;
}
nav ul li.active a {
background-color: none;
color: white;
text-decoration: none;
}
nav ul li a:hover {
color: #00E3FF;
}
nav ul li a:visited {
text-decoration: none;
}
/*nav ul li a {
display:inline-block;
padding: 1 px;
color: #fff;
letter-spacing: 1 px;
text-decoration:none;
text-transform: uppercase;
margin: .55em;
font-size: 5 px;
float: right;
}
nav ul li.active a {
/*background-color: none;
color: white;
text-decoration:none;
}
a:hover {
/*background-color:none;
color:black;
background-color:#00E3FF;
}
nav ul li a:visited {
color:black;
text-decoration:none;
}
*/
form {
padding-left: 20%;
}
/* header tags */
h1 {
text-align: center;
color: #013397;
font-size: 40px;
padding-top: 50px;
}
h2 {
text-align: center;
color: #00E3FF;
font-size: 30px;
margin: 5px;
padding: 20px;
}
p {
text-align: left;
}
.clearfix:after {
content: " ";
display: block;
clear: both;
}
#box {
background-color: #94DBEC;
}
hr.style2 {
border-top: 3px double #00E3FF;
width: 300px
}
section {
width: 85%;
margin-left: auto;
margin-right: auto;
margin-top: 35px;
}
img.adjustable {
width: 100%;
max-width: 100%;
height: auto;
/* max-width: 400px;
max-height: 400px;*/
margin: 1em;
/*width: 90%;
margin:5%;*/
}
#inner {
height: 100px;
padding: 15px 0;
}
#container {
height: 100%;
}
.imgbox5 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox4 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox3 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox2 {
padding-right: 30px;
}
.imgbox {
padding-right: 30px;
padding-left: 0px;
}
#firstpara {
background-color: #5E5757;
color: white;
}
#secpara {
background-color: #5E5757;
color: white;
}
#thirdpara {
background-color: #5E5757;
color: white;
}
#fourthpara {
background-color: #5E5757;
color: white;
}
#primary {
background-color: #5E5757;
color: white;
}
#enroll {
margin: 0;
padding: 0;
}
/*section{
text-align: center;
width: 100%;
}*/
footer {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 100px;
padding-bottom: 2%;
background-color: #670809;
font-family: 'Inconsolata', monospace;
/* text */
padding-left: 10px;
padding-top: 15px;
color: #ffffff;
font-size: 15px;
text-align: center;
}
a {
color: white;
}
a,
a:active {
color: white;
text-decoration: none;
}
.side {
left-margin: 10px;
right-margin: 10px;
}
object {
position: absolute;
top: 350px;
left: 100px;
height: 100px;
width: 200px;
z-index: 2000;
}
#headline {
text-align: center;
position: absolute;
top: 10%;
left: 35%;
color: #00E3FF;
line-height: 20px;
font-family: 'Orbitron', sans-serif;
word-spacing: 1px;
font-size: 12px;
}
#value {
background-color: #5E5757;
color: white;
width: 90%;
margin-left: auto;
margin-right: auto;
margin-top: 2%;
}
#title {
color: white;
text-align: center;
padding-top: 10px;
}
img {
width: 100%;
display: block;
}
/*.img{
border-width:thick;
border-style:solid;
border-color:white;
}
.column-right{
float: right;
width: 30%;
padding: 1%;
}
.column-center{
display: inline-block;
width: 30%;
padding: 1%;
bottom: 18px;
}
.column-left{
float: left;file:///Volumes/MMG/webfix/video/techpic1.jpg
width: 30%;
padding: 1%;
}
#left-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
}
#middle-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
}
#right-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
padding-bottom:135px;
}
.more {
position: relative;
display:inline-block;
color:black;
font-weight: bold;
top: 20px;
right: 31px;
background-color:white;
border-bottom-left-radius: 10px;
padding: 6px;
margin: 9px;
width: 30%;
}
#button3, #button2{
color: black;
position:relative;
top: 36px;
right:36px;
}
#button1{
color:black;
position:relative;
top: 155px;
right:36px;
}
*/
/*NAV BAR*/
#import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
#import url("http://fonts.googleapis.com/css?family=Open+Sans:400,300");
html {
font-size: 62.5%;
font-family: 'Open Sans', sans-serif;
}
body {
font-size: 1.6rem;
min-height: 100vh;
}
h1 {
font-size: 3rem;
margin-bottom: 1rem;
}
h2 {
font-size: 1.6rem;
}
header {
position: relative;
}
main {
padding: 2rem;
}
/***************** NAVIGATION ********************/
nav ul {
display: flex;
flex-wrap: wrap;
margin: 0 auto;
background: #670809;
}
nav ul,
nav li {
flex: 1;
}
nav li:last-child {
border-bottom: none;
}
nav a {
text-decoration: none;
color: inherit;
display: block;
font-size: 1.8rem;
}
nav a:hover {
background:
/*#adacac*/
#555;
color: #fff;
}
nav li {
position: relative;
line-height: 50px;
color: #fff;
text-align: center;
}
nav input,
nav label {
display: none;
width: 36px;
height: 36px;
background: #555;
color: #fff;
text-align: center;
line-height: 36px;
font-size: 1.6rem;
border-radius: 4px;
}
nav label {
position: absolute;
top: 8px;
right: 8px;
transition: .4s;
}
nav label:hover {
cursor: pointer;
}
nav label:before {
font-family: FontAwesome;
font-size: 24px;
content: "\f0c9";
text-align: center;
}
/*************** MEDIA QUERIES *******************/
nav ul {
transform: translateY(0);
box-shadow: 0 0 5px rgba(0, 0, 0, .7);
transition: all .5s;
}
nav li {
flex: none;
width: 100%;
border-bottom: solid 1px #777;
}
nav input[type="checkbox"]:checked + ul {
transform: translateY(-100%);
width: 100%;
background: #999;
transition: all .5s;
}
nav label {
display: block;
}
nav input[type="checkbox"]:checked + ul li:nth-child(1) {
background: #777;
color: #fff;
}
#css-toggle-menu {
float: right;
margin: 10px;
}
<footer>
<a id="enroll" href="https://www.mnstate.edu/eservices/"> Enroll Now</a>
<div class="text">
MaKayla McLain-Graning © 2016</div>
<br>
<img class="msum" src="https://www.mnstate.edu/uploadedImages/Content/Marketing/logos/MSUM_Signature_Horiz_Color.jpg?n=808" alt="msum logo" />
</footer>
Preview
Check out the snippet below. The big thing you were missing is using the CSS left and transform properties. (You'll notice I also included the vendor-prefixed variants of the transform property to ensure it works on all major browsers). Additionally, you'll notice I replaced the absolute positioning that you had set for the .msum CSS selector with relative positioning. This is more optimal in this case and will ensure your image does not overlap with the text also present in the footer.
.msum {
position: relative;
bottom: 5%;
width: 100%;
left: 50%; /* Distribute from left-edge */
display: block;
width: 200px;
height: 50px;
/* Center horizontally */
-webkit-transform: translateX(-50%);
-moz-transform: translateX(-50%);
-ms-transform: translateX(-50%);
-o-transform: translateX(-50%);
transform: translateX(-50%);
}
/*Rest of Code*/
figure.stayssame {
width: 100%;
}
figure video {
width: 100%;
height: 80%;
}
p {
padding: 2%;
}
.video-txt {
position: absolute;
top: 30%;
z-index: 9;
color: #FFF;
width: 100%;
text-align: center;
font-size: 40px;
}
object {
position: absolute;
left: 0%;
top: -5%;
z-index: 10;
width: 15%;
}
/*ALL CODE FROM DESKTOP*/
figure.adjustable {
width: 29%;
}
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 100px;
/* bottom = footer height */
font-family: 'Inconsolata', monospace;
/*font-family: 'Courier New', sans-serif;*/
font-weight: 300;
font-size: 20px;
line-height: 1.4em;
}
.squish {
margin-right: 125px;
}
.text {
padding: 5px;
}
.button {
margin-bottom: 50px;
margin-left: 20%
}
header {
position: fixed;
z-index: 1000;
width: 100%;
top: 0px;
background-color: #670809;
height: 70px;
letter-spacing: 1px;
line-height: 55px;
padding: 9px;
word-spacing: 5px;
}
header,
h1,
h2 {
font-family: 'Orbitron', sans-serif;
}
.space {
padding: 5px;
color: white;
}
nav {
float: left;
width: 100%;
}
nav ul li.active a {
background-color: none;
color: white;
text-decoration: none;
}
nav ul li a:hover {
color: #00E3FF;
}
nav ul li a:visited {
text-decoration: none;
}
/*nav ul li a {
display:inline-block;
padding: 1 px;
color: #fff;
letter-spacing: 1 px;
text-decoration:none;
text-transform: uppercase;
margin: .55em;
font-size: 5 px;
float: right;
}
nav ul li.active a {
/*background-color: none;
color: white;
text-decoration:none;
}
a:hover {
/*background-color:none;
color:black;
background-color:#00E3FF;
}
nav ul li a:visited {
color:black;
text-decoration:none;
}
*/
form {
padding-left: 20%;
}
/* header tags */
h1 {
text-align: center;
color: #013397;
font-size: 40px;
padding-top: 50px;
}
h2 {
text-align: center;
color: #00E3FF;
font-size: 30px;
margin: 5px;
padding: 20px;
}
p {
text-align: left;
}
.clearfix:after {
content: " ";
display: block;
clear: both;
}
#box {
background-color: #94DBEC;
}
hr.style2 {
border-top: 3px double #00E3FF;
width: 300px
}
section {
width: 85%;
margin-left: auto;
margin-right: auto;
margin-top: 35px;
}
img.adjustable {
width: 100%;
max-width: 100%;
height: auto;
/* max-width: 400px;
max-height: 400px;*/
margin: 1em;
/*width: 90%;
margin:5%;*/
}
#inner {
height: 100px;
padding: 15px 0;
}
#container {
height: 100%;
}
.imgbox5 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox4 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox3 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox2 {
padding-right: 30px;
}
.imgbox {
padding-right: 30px;
padding-left: 0px;
}
#firstpara {
background-color: #5E5757;
color: white;
}
#secpara {
background-color: #5E5757;
color: white;
}
#thirdpara {
background-color: #5E5757;
color: white;
}
#fourthpara {
background-color: #5E5757;
color: white;
}
#primary {
background-color: #5E5757;
color: white;
}
#enroll {
margin: 0;
padding: 0;
}
/*section{
text-align: center;
width: 100%;
}*/
footer {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 100px;
padding-bottom: 2%;
background-color: #670809;
font-family: 'Inconsolata', monospace;
/* text */
padding-left: 10px;
padding-top: 15px;
color: #ffffff;
font-size: 15px;
text-align: center;
}
a {
color: white;
}
a,
a:active {
color: white;
text-decoration: none;
}
.side {
left-margin: 10px;
right-margin: 10px;
}
object {
position: absolute;
top: 350px;
left: 100px;
height: 100px;
width: 200px;
z-index: 2000;
}
#headline {
text-align: center;
position: absolute;
top: 10%;
left: 35%;
color: #00E3FF;
line-height: 20px;
font-family: 'Orbitron', sans-serif;
word-spacing: 1px;
font-size: 12px;
}
#value {
background-color: #5E5757;
color: white;
width: 90%;
margin-left: auto;
margin-right: auto;
margin-top: 2%;
}
#title {
color: white;
text-align: center;
padding-top: 10px;
}
img {
width: 100%;
display: block;
}
/*.img{
border-width:thick;
border-style:solid;
border-color:white;
}
.column-right{
float: right;
width: 30%;
padding: 1%;
}
.column-center{
display: inline-block;
width: 30%;
padding: 1%;
bottom: 18px;
}
.column-left{
float: left;file:///Volumes/MMG/webfix/video/techpic1.jpg
width: 30%;
padding: 1%;
}
#left-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
}
#middle-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
}
#right-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
padding-bottom:135px;
}
.more {
position: relative;
display:inline-block;
color:black;
font-weight: bold;
top: 20px;
right: 31px;
background-color:white;
border-bottom-left-radius: 10px;
padding: 6px;
margin: 9px;
width: 30%;
}
#button3, #button2{
color: black;
position:relative;
top: 36px;
right:36px;
}
#button1{
color:black;
position:relative;
top: 155px;
right:36px;
}
*/
/*NAV BAR*/
#import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
#import url("http://fonts.googleapis.com/css?family=Open+Sans:400,300");
html {
font-size: 62.5%;
font-family: 'Open Sans', sans-serif;
}
body {
font-size: 1.6rem;
min-height: 100vh;
}
h1 {
font-size: 3rem;
margin-bottom: 1rem;
}
h2 {
font-size: 1.6rem;
}
header {
position: relative;
}
main {
padding: 2rem;
}
/***************** NAVIGATION ********************/
nav ul {
display: flex;
flex-wrap: wrap;
margin: 0 auto;
background: #670809;
}
nav ul,
nav li {
flex: 1;
}
nav li:last-child {
border-bottom: none;
}
nav a {
text-decoration: none;
color: inherit;
display: block;
font-size: 1.8rem;
}
nav a:hover {
background:
/*#adacac*/
#555;
color: #fff;
}
nav li {
position: relative;
line-height: 50px;
color: #fff;
text-align: center;
}
nav input,
nav label {
display: none;
width: 36px;
height: 36px;
background: #555;
color: #fff;
text-align: center;
line-height: 36px;
font-size: 1.6rem;
border-radius: 4px;
}
nav label {
position: absolute;
top: 8px;
right: 8px;
transition: .4s;
}
nav label:hover {
cursor: pointer;
}
nav label:before {
font-family: FontAwesome;
font-size: 24px;
content: "\f0c9";
text-align: center;
}
/*************** MEDIA QUERIES *******************/
nav ul {
transform: translateY(0);
box-shadow: 0 0 5px rgba(0, 0, 0, .7);
transition: all .5s;
}
nav li {
flex: none;
width: 100%;
border-bottom: solid 1px #777;
}
nav input[type="checkbox"]:checked + ul {
transform: translateY(-100%);
width: 100%;
background: #999;
transition: all .5s;
}
nav label {
display: block;
}
nav input[type="checkbox"]:checked + ul li:nth-child(1) {
background: #777;
color: #fff;
}
#css-toggle-menu {
float: right;
margin: 10px;
}
<footer>
<a id="enroll" href="https://www.mnstate.edu/eservices/"> Enroll Now</a>
<div class="text">
MaKayla McLain-Graning © 2016</div>
<br>
<img class="msum" src="https://www.mnstate.edu/uploadedImages/Content/Marketing/logos/MSUM_Signature_Horiz_Color.jpg?n=808" alt="msum logo" />
</footer>
.msum {
position: absolute;
bottom: 5%;
width: 100%;
display: block;
width: 200px;
height: 50px;
left:50%;
margin-left:-100px;
}
/*Rest of Code*/
figure.stayssame {
width: 100%;
}
figure video {
width: 100%;
height: 80%;
}
p {
padding: 2%;
}
.video-txt {
position: absolute;
top: 30%;
z-index: 9;
color: #FFF;
width: 100%;
text-align: center;
font-size: 40px;
}
object {
position: absolute;
left: 0%;
top: -5%;
z-index: 10;
width: 15%;
}
/*ALL CODE FROM DESKTOP*/
figure.adjustable {
width: 29%;
}
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 100px;
/* bottom = footer height */
font-family: 'Inconsolata', monospace;
/*font-family: 'Courier New', sans-serif;*/
font-weight: 300;
font-size: 20px;
line-height: 1.4em;
}
.squish {
margin-right: 125px;
}
.text {
padding: 5px;
}
.button {
margin-bottom: 50px;
margin-left: 20%
}
header {
position: fixed;
z-index: 1000;
width: 100%;
top: 0px;
background-color: #670809;
height: 70px;
letter-spacing: 1px;
line-height: 55px;
padding: 9px;
word-spacing: 5px;
}
header,
h1,
h2 {
font-family: 'Orbitron', sans-serif;
}
.space {
padding: 5px;
color: white;
}
nav {
float: left;
width: 100%;
}
nav ul li.active a {
background-color: none;
color: white;
text-decoration: none;
}
nav ul li a:hover {
color: #00E3FF;
}
nav ul li a:visited {
text-decoration: none;
}
/*nav ul li a {
display:inline-block;
padding: 1 px;
color: #fff;
letter-spacing: 1 px;
text-decoration:none;
text-transform: uppercase;
margin: .55em;
font-size: 5 px;
float: right;
}
nav ul li.active a {
/*background-color: none;
color: white;
text-decoration:none;
}
a:hover {
/*background-color:none;
color:black;
background-color:#00E3FF;
}
nav ul li a:visited {
color:black;
text-decoration:none;
}
*/
form {
padding-left: 20%;
}
/* header tags */
h1 {
text-align: center;
color: #013397;
font-size: 40px;
padding-top: 50px;
}
h2 {
text-align: center;
color: #00E3FF;
font-size: 30px;
margin: 5px;
padding: 20px;
}
p {
text-align: left;
}
.clearfix:after {
content: " ";
display: block;
clear: both;
}
#box {
background-color: #94DBEC;
}
hr.style2 {
border-top: 3px double #00E3FF;
width: 300px
}
section {
width: 85%;
margin-left: auto;
margin-right: auto;
margin-top: 35px;
}
img.adjustable {
width: 100%;
max-width: 100%;
height: auto;
/* max-width: 400px;
max-height: 400px;*/
margin: 1em;
/*width: 90%;
margin:5%;*/
}
#inner {
height: 100px;
padding: 15px 0;
}
#container {
height: 100%;
}
.imgbox5 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox4 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox3 {
padding-right: 30px;
padding-left: 0px;
}
.imgbox2 {
padding-right: 30px;
}
.imgbox {
padding-right: 30px;
padding-left: 0px;
}
#firstpara {
background-color: #5E5757;
color: white;
}
#secpara {
background-color: #5E5757;
color: white;
}
#thirdpara {
background-color: #5E5757;
color: white;
}
#fourthpara {
background-color: #5E5757;
color: white;
}
#primary {
background-color: #5E5757;
color: white;
}
#enroll {
margin: 0;
padding: 0;
}
/*section{
text-align: center;
width: 100%;
}*/
footer {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 100px;
padding-bottom: 2%;
background-color: #670809;
font-family: 'Inconsolata', monospace;
/* text */
padding-left: 10px;
padding-top: 15px;
color: #ffffff;
font-size: 15px;
text-align: center;
}
a {
color: white;
}
a,
a:active {
color: white;
text-decoration: none;
}
.side {
left-margin: 10px;
right-margin: 10px;
}
object {
position: absolute;
top: 350px;
left: 100px;
height: 100px;
width: 200px;
z-index: 2000;
}
#headline {
text-align: center;
position: absolute;
top: 10%;
left: 35%;
color: #00E3FF;
line-height: 20px;
font-family: 'Orbitron', sans-serif;
word-spacing: 1px;
font-size: 12px;
}
#value {
background-color: #5E5757;
color: white;
width: 90%;
margin-left: auto;
margin-right: auto;
margin-top: 2%;
}
#title {
color: white;
text-align: center;
padding-top: 10px;
}
img {
width: 100%;
display: block;
}
/*.img{
border-width:thick;
border-style:solid;
border-color:white;
}
.column-right{
float: right;
width: 30%;
padding: 1%;
}
.column-center{
display: inline-block;
width: 30%;
padding: 1%;
bottom: 18px;
}
.column-left{
float: left;file:///Volumes/MMG/webfix/video/techpic1.jpg
width: 30%;
padding: 1%;
}
#left-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
}
#middle-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
}
#right-box{
background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
padding-bottom:135px;
}
.more {
position: relative;
display:inline-block;
color:black;
font-weight: bold;
top: 20px;
right: 31px;
background-color:white;
border-bottom-left-radius: 10px;
padding: 6px;
margin: 9px;
width: 30%;
}
#button3, #button2{
color: black;
position:relative;
top: 36px;
right:36px;
}
#button1{
color:black;
position:relative;
top: 155px;
right:36px;
}
*/
/*NAV BAR*/
#import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
#import url("http://fonts.googleapis.com/css?family=Open+Sans:400,300");
html {
font-size: 62.5%;
font-family: 'Open Sans', sans-serif;
}
body {
font-size: 1.6rem;
min-height: 100vh;
}
h1 {
font-size: 3rem;
margin-bottom: 1rem;
}
h2 {
font-size: 1.6rem;
}
header {
position: relative;
}
main {
padding: 2rem;
}
/***************** NAVIGATION ********************/
nav ul {
display: flex;
flex-wrap: wrap;
margin: 0 auto;
background: #670809;
}
nav ul,
nav li {
flex: 1;
}
nav li:last-child {
border-bottom: none;
}
nav a {
text-decoration: none;
color: inherit;
display: block;
font-size: 1.8rem;
}
nav a:hover {
background:
/*#adacac*/
#555;
color: #fff;
}
nav li {
position: relative;
line-height: 50px;
color: #fff;
text-align: center;
}
nav input,
nav label {
display: none;
width: 36px;
height: 36px;
background: #555;
color: #fff;
text-align: center;
line-height: 36px;
font-size: 1.6rem;
border-radius: 4px;
}
nav label {
position: absolute;
top: 8px;
right: 8px;
transition: .4s;
}
nav label:hover {
cursor: pointer;
}
nav label:before {
font-family: FontAwesome;
font-size: 24px;
content: "\f0c9";
text-align: center;
}
/*************** MEDIA QUERIES *******************/
nav ul {
transform: translateY(0);
box-shadow: 0 0 5px rgba(0, 0, 0, .7);
transition: all .5s;
}
nav li {
flex: none;
width: 100%;
border-bottom: solid 1px #777;
}
nav input[type="checkbox"]:checked + ul {
transform: translateY(-100%);
width: 100%;
background: #999;
transition: all .5s;
}
nav label {
display: block;
}
nav input[type="checkbox"]:checked + ul li:nth-child(1) {
background: #777;
color: #fff;
}
#css-toggle-menu {
float: right;
margin: 10px;
}
<footer>
<a id="enroll" href="https://www.mnstate.edu/eservices/"> Enroll Now</a>
<div class="text">
MaKayla McLain-Graning © 2016</div>
<br>
<img class="msum" src="https://www.mnstate.edu/uploadedImages/Content/Marketing/logos/MSUM_Signature_Horiz_Color.jpg?n=808" alt="msum logo" />
</footer>