Why is my footer not centered? (HTML & CSS) - html

html,
body {
width: 100%;
margin: 0px;
padding: 0px;
font-family: 'Century Gothic', sans-serif;
box-sizing: border-box;
overflow-x: hidden;
}
.wrapper {
overflow-x: hidden;
}
#main-header {
background-color: transparent;
text-align: center;
color: darkslategray;
font-family: 'Century Gothic', sans-serif;
font-size: 20px;
letter-spacing: 4px;
line-height: 50px;
}
#main-header a {
color: darkslategray;
text-decoration: none;
transition: all ease-in-out 250ms;
}
#main-header a:hover {
color: #5e3232;
}
#menu {
background-color: transparent;
}
#menu ul {
background-color: transparent;
text-align: center;
padding: 0;
list-style: none;
}
#menu li {
display: inline;
}
#menu a {
font-size: 18px;
padding-left: 10px;
padding-right: 10px;
color: darkslategray;
text-decoration: none;
transition: all ease-in-out 250ms;
}
#menu a:hover {
color: rgb(136, 94, 38);
}
body {
background-color: /*linear-gradient(60deg, #CCFFFF, #FFCCCC);*/
thistle;
background-repeat: none;
line-height: 24px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 16px;
color: #555;
font-weight: normal;
}
main {
margin: 0 auto;
padding: 30px 20px;
width: 90vw;
}
section {
margin: auto;
}
article {
padding: 20px;
margin-bottom: 20px;
}
footer {
text-align: center;
font-size: 15px;
font-family: 'Century Gothic', sans-serif;
padding: 20px;
background-color: thistle;
bottom: 0;
margin: 0;
width: 100%;
position: absolute;
}
#item a {
font-size: 18px;
color: darkslategray;
text-decoration: none;
transition: all ease-in-out 250ms;
}
#item a:hover {
color: rgba(104, 161, 28, 0.911);
}
#media (max-width: 768px) {
#main-header {
float: none;
text-align: center;
padding-top: 15px;
}
#main-header h1 {
font-size: 24px;
line-height: 25px;
}
.logos {
padding-top: 5px;
}
#menu {
margin-top: -10px;
}
#menu a {
font-size: 17px;
}
body {
position: relative;
}
body::after {
content: "";
display: block;
height: 50px;
}
body h2 {
font-size: 20px;
margin-top: -25px;
}
body p {
font-size: 16px;
}
}
<div class="wrapper">
<header id="main-header" class="alt">
<div class="logos">
</i>
</i>
</i>
</div>
</header>
<nav id="menu">
<!--<div class="container">-->
<ul class="links">
<li>Home</li>
<li>About Me</li>
<li class="current">Projects</li>
</ul>
<!--</div>-->
</nav>
<main>
<section>
<article id="item">
<h2>Projects</h2>
<h4>Request</h4>
<small>January to April 2020</small>
<h4>Reverse</h4>
<small>September to December 2018</small>
</article>
</section>
</main>
<footer>
<p>© 2020</p>
</footer>
</div>
I'm not sure why my footer is not centered. The main header, menu, and social media links are all centered, but it's just the footer that is not. I've tried redoing the code from scratch, but I'm not sure if I missed something. I'm new to coding, so any help would be appreciated.

The problem is in your footer css declaration. You have the padding set to 20px and width at 100%, which is adding some space to the left of your footer and offsetting it, but since the width is 100%, it spans past the page width.
Just change the padding to only apply to the top and bottom
footer {
text-align: center;
font-size: 15px;
font-family: 'Century Gothic', sans-serif;
padding: 20px 0;
background-color: thistle;
bottom: 0;
margin: 0;
width: 100%;
position: absolute;
}

Your problem is with box-sizing box-sizing: content-box is the default setting, which means that the rendering engine measures the width (set here to 100%) before adding the padding. box-sizing: content-box will tell the rendering engine to add the padding into the measurement, so your width: 100% will include the 20px padding.
html,
body {
width: 100%;
margin: 0px;
padding: 0px;
font-family: 'Century Gothic', sans-serif;
box-sizing: border-box;
overflow-x: hidden;
}
.wrapper {
overflow-x: hidden;
}
#main-header {
background-color: transparent;
text-align: center;
color: darkslategray;
font-family: 'Century Gothic', sans-serif;
font-size: 20px;
letter-spacing: 4px;
line-height: 50px;
}
#main-header a {
color: darkslategray;
text-decoration: none;
transition: all ease-in-out 250ms;
}
#main-header a:hover {
color: #5e3232;
}
#menu {
background-color: transparent;
}
#menu ul {
background-color: transparent;
text-align: center;
padding: 0;
list-style: none;
}
#menu li {
display: inline;
}
#menu a {
font-size: 18px;
padding-left: 10px;
padding-right: 10px;
color: darkslategray;
text-decoration: none;
transition: all ease-in-out 250ms;
}
#menu a:hover {
color: rgb(136, 94, 38);
}
body {
background-color: /*linear-gradient(60deg, #CCFFFF, #FFCCCC);*/
thistle;
background-repeat: none;
line-height: 24px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 16px;
color: #555;
font-weight: normal;
}
main {
margin: 0 auto;
padding: 30px 20px;
width: 90vw;
}
section {
margin: auto;
}
article {
padding: 20px;
margin-bottom: 20px;
}
footer {
text-align: center;
font-size: 15px;
font-family: 'Century Gothic', sans-serif;
padding: 20px;
background-color: thistle;
bottom: 0;
margin: 0;
width: 100%;
position: absolute;
box-sizing: border-box;
}
#item a {
font-size: 18px;
color: darkslategray;
text-decoration: none;
transition: all ease-in-out 250ms;
}
#item a:hover {
color: rgba(104, 161, 28, 0.911);
}
#media (max-width: 768px) {
#main-header {
float: none;
text-align: center;
padding-top: 15px;
}
#main-header h1 {
font-size: 24px;
line-height: 25px;
}
.logos {
padding-top: 5px;
}
#menu {
margin-top: -10px;
}
#menu a {
font-size: 17px;
}
body {
position: relative;
}
body::after {
content: "";
display: block;
height: 50px;
}
body h2 {
font-size: 20px;
margin-top: -25px;
}
body p {
font-size: 16px;
}
}
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="wrapper">
<header id="main-header" class="alt">
<div class="logos">
</i>
</i>
</i>
</div>
</header>
<nav id="menu">
<!--<div class="container">-->
<ul class="links">
<li>Home</li>
<li>About Me</li>
<li class="current">Projects</li>
</ul>
<!--</div>-->
</nav>
<main>
<section>
<article id="item">
<h2>Projects</h2>
<h4>Request</h4>
<small>January to April 2020</small>
<h4>Reverse</h4>
<small>September to December 2018</small>
</article>
</section>
</main>
<footer>
<p>© 2020</p>
</footer>
</div>

Related

Center Headers in Footer to Organize it

I was able to find an html and css code to start creating my footer.
I was able to make it look a bit the way I want as seen in the following code:
However, I wanna be able to center all three headers and I can't seem to find how...
* {
margin: 0;
padding: 0;
}
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
line-height: 1.5;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.textDecoration {
text-decoration: none;
color: inherit;
}
.container {
max-width: 100%;
margin: 0px;
}
.row {
display: flex;
flex-wrap: wrap;
}
ul {
list-style: none;
}
.footer {
background-color: #24262b;
padding: 0px 0;
width: 100%;
}
.footer-col {
width: 25%;
padding: 0 15px;
}
.footer-col h4 {
font-size: 18px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: red;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px;
}
.footer-col ul li a {
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
<p>In this example, we remove the bullets from the list, and its default padding and margin.</p>
<ul>
<li>Home</li>
<li>News</li>
<li>Contact</li>
<li>About</li>
</ul>
<footer class="footer">
<div class="container">
<div class="row">
<div class="footer-col">
<h4>Terms & Conditions</h4>
</div>
<div class="footer-col">
<h4><a class="textDecoration" href="#privacy">Privacy and Policy</a></h4>
</div>
<div class="footer-col">
<h4>Follow Us</h4>
<div class="social-links">
</div>
</div>
<div class="footer-col">
<div class="social-links">
<h3><img src="https://i.ibb.co/Lp1sB0M/face4.png"></a>
<img src="https://i.ibb.co/XVzFjBR/ig3.png"></a>
<img src="https://i.ibb.co/vVRq5dz/tw2.png"></a>
<img src="https://i.ibb.co/8j8dWcG/yt2.png"></a>
</h3>
</div>
</div>
</div>
</footer>
Any hints you can provide me to achieve this?
What would you recommend for social network icons for the footer?
It makes sense to put all h4's in a single footer-col div together because you want them grouped in the center. So you can do that, then add display: flex; to footer-col and use justify-content: center; to center them. Then you can add a gap to space them out. I also added display: flex; on your social-links to allow them to flex to stay on the same line.
* {
margin: 0;
padding: 0;
}
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#300;400;500;600;700&display=swap');
body {
line-height: 1.5;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.social-links {
display: flex;
}
.textDecoration {
text-decoration: none;
color: inherit;
}
.container {
max-width: 100%;
margin: 0px;
}
.row {
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
}
ul {
list-style: none;
}
.footer {
background-color: #24262b;
padding: 0px 0;
width: 100%;
}
.footer-col {
display: flex;
width: 100%;
justify-content: center;
gap: 2em;
}
.footer-col h4 {
font-size: 18px;
color: #ffffff;
text-transform: capitalize;
margin-bottom: 35px;
font-weight: 500;
position: relative;
}
.footer-col h4::before {
content: '';
position: absolute;
left: 0;
bottom: -10px;
background-color: red;
height: 2px;
box-sizing: border-box;
width: 50px;
}
.footer-col ul li:not(:last-child) {
margin-bottom: 10px;
}
.footer-col ul li a {
font-size: 16px;
text-transform: capitalize;
color: #ffffff;
text-decoration: none;
font-weight: 300;
color: #bbbbbb;
display: block;
transition: all 0.3s ease;
}
.footer-col ul li a:hover {
color: #ffffff;
padding-left: 8px;
}
.footer-col .social-links a {
display: inline-block;
height: 40px;
width: 40px;
background-color: rgba(255, 255, 255, 0.2);
margin: 0 10px 10px 0;
text-align: center;
line-height: 40px;
border-radius: 50%;
color: #ffffff;
transition: all 0.5s ease;
}
.footer-col .social-links a:hover {
color: #24262b;
background-color: #ffffff;
}
<!DOCTYPE html>
<html>
<head>
<style>
</style>
</head>
<body>
<p>In this example, we remove the bullets from the list, and its default padding and margin.</p>
<ul>
<li>Home</li>
<li>News</li>
<li>Contact</li>
<li>About</li>
</ul>
<footer class="footer">
<div class="container">
<div class="row">
<div class="footer-col">
<h4>Terms & Conditions</h4>
<h4><a class="textDecoration" href="#privacy">Privacy and Policy</a></h4>
<h4>Follow Us</h4>
</div>
<div class="social-links"><img src="./img/face4.png">
<img src="./img/ig3.png">
<img src="./img/tw2.png">
<img src="./img/yt2.png">
</div>
</div>
</div>
</footer>
</body>
</html>

Unable to get two <p> or <div> in the footer to be stacked

I've tried having it be an unordered list item without it being a paragraph element, I've tried putting it in a div as well. For some reason I'm just unable to get those to be stacked with the smaller "test" under the bigger TestTest. Seems to work in the rest of the page if I have it as a separate div, just not sure of the reason why it's not working in the footer.
Here is my HTML and CSS:
body {
background-color: #414141;
/* background: url(/images/background.jpg) no-repeat center center fixed;
background-size: cover;
resize: both;
overflow: scroll;
overflow-x: hidden; */
margin: 0;
padding: 0;
}
::-webkit-scrollbar {
width: 0px;
font-family: Arial;
}
#font-face {
font-family: ubuntu-medium;
src: url(/fonts/ubuntu-medium.ttf);
}
#media (max-width: 7680px) {
body {
background: url(/images/background.jpg) no-repeat center center fixed;
background-size: cover;
resize: both;
overflow: scroll;
overflow-x: hidden;
}
}
#media (max-width: 800px) {
body {
background: url(/images/mobilebackground.jpg) no-repeat center center fixed;
}
}
#NavSection {
margin-top: 3%;
}
#MainNav {
position: left;
margin-left: 11%;
}
#Menu li {
font-family: ubuntu-medium;
font-weight: normal;
color: #414141;
padding: 0px 10px;
display: inline;
font-size: 15px;
list-style-type: none;
}
#Menu a:hover {
text-decoration-color: #414141;
text-underline-offset: 0.12em;
text-decoration-line: underline;
text-decoration-style: solid;
text-decoration-thickness: 4px;
box-shadow: 0px 13px 4px -3px rgba(65, 65, 65, 0.616);
}
hr {
margin: 0px;
border: 2px solid red;
width: auto;
}
a {
color: #414141;
text-decoration: none;
}
a:active {
color: #ff0000;
}
#SiteTitle {
margin-left: 0.5%;
}
#TestTest {
font-family: Impact;
font-weight: normal;
font-size: 30px;
color: #ffffff;
text-decoration: underline;
text-decoration-color: #414141;
text-decoration-thickness: 2px;
text-underline-offset: 0.08em;
}
#Japan {
color: red;
}
ul {
list-style-type: none;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}
#SecondNav {
float: right;
font-family: ubuntu-medium;
font-weight: normal;
color: #414141;
padding: 0px 10px;
font-size: 15px;
margin-right: 11%;
}
#SecondMenu a:hover {
text-decoration: overline 4px solid #414141;
box-shadow: 0px -13px 4px -3px rgba(65, 65, 65, 0.616);
}
#SecondMenu li {
margin-bottom: 5px;
font-family: ubuntu-medium;
font-weight: normal;
color: #414141;
padding: 0px 10px;
display: inline;
font-size: 15px;
list-style-type: none;
}
#ContentDiv {
width: 70%;
height: 40%;
position: absolute;
top: 30%;
left: 15%;
transform: translateX(0%);
background-color: rgba(255, 0, 0, 0.4);
}
#ContentSection {
width: 90%;
height: 70%;
position: absolute;
top: 15%;
left: 5%;
background-color: rgba(255, 255, 255, 0.9);
}
#Content {
margin: 3%;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 7%;
background-color: #414141;
font-family: Impact;
font-weight: normal;
font-size: 20px;
color: #ffffff;
}
#FooterTitle {
float: right;
margin: 0.5%;
}
#FooterJapan {
color: #ff0000;
}
#FooterCaption {
font-size: x-small;
float: right;
margin: 0.5%;
font-family: ubuntu-medium;
font-weight: normal;
}
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css" />
</head>
<body>
<div id="NavSection">
<div id="TopNav">
<nav id="MainNav">
<ul id="Menu">
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
</div>
<hr />
<div id="SecondNavSection">
<nav id="SecondNav">
<ul id="SecondMenu">
<li>Archives</li>
<li>Categories</li>
</ul>
</nav>
</div>
<div id="SiteTitle">
<h1 id="TestTest">Test<span id="Japan">Test</span></h1>
</div>
</div>
<div id="ContentDiv">
<main id="ContentSection">
<div id="Content">
<p>Content goes here.</p>
</div>
</main>
</div>
<footer>
<p id="FooterTitle">Test <span id="FooterJapan">Test</span></p>
<p id="FooterCaption">Test</p>
</footer>
</body>
</html>
You should not be using float for FooterTitle and FooterCaption -- So remove the float:right;
Then you can add text-align:right; to the <footer> CSS
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 7%;
background-color: #414141;
font-family: Impact;
font-weight: normal;
font-size: 20px;
color: #ffffff;
text-align:right;
}
#FooterTitle {
margin: 0.5%;
}
#FooterJapan {
color: #ff0000;
}
#FooterCaption {
font-size: x-small;
margin: 0.5%;
font-family: ubuntu-medium;
font-weight: normal;
}
The rest .. Like height and getting everything to show in the footer I trust you can do :) -- Personally, I think height:7%; is a bad idea .. Better to give it a static height height, or a height that statically will change inside media queries. --
OR You could scrap the text align right to get it to align left but still float right like:
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
background-color: #414141;
font-family: Impact;
font-weight: normal;
font-size: 20px;
color: #ffffff;
}
#FooterTitle {
margin: 0.5%;
}
#FooterJapan {
color: #ff0000;
}
#FooterCaption {
font-size: x-small;
margin: 0.5%;
font-family: ubuntu-medium;
font-weight: normal;
}
#footer-right-content{
float:right;
text-align:left;
width:100px;
}
HTML
<footer>
<div id="footer-right-content">
<p id="FooterTitle">Test <span id="FooterJapan">Test</span></p>
<p id="FooterCaption">Test</p>
</div>
</footer>

BreadCrumb. Why does it show the whole list instead just the page is opened and the one before?

I need to fix my BreadCrumb in my simple website, it shows the whole list not just the one is opened with the pages before. Like, it should show HOME, HOME>About Us, HOME>Gallery, HOME>Contact US. But just show the whole breadcrumb list the whole time.
Can you help me? thanks
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div>
<img style="width: 370px;" src="pictures/logo.png" />
</div>
<div>
<ul class="breadcrumb">
<li>Home</li>
<li>About Us</li>
<li>Our Menu</li>
<li>Gallery</li>
<li>Contact Us</li>
</ul>
</div>
<div>
<nav id="mainMenu">
<ul class="menu">
<li>Home</li>
<li>About Us</li>
<li>Our Menu</li>
<li>Gallery</li>
<li>Contact Us</li>
</ul>
</nav>
</div>
<div style="width: 100%;" id="slider">
<br /> <br />
<figure />
<img src="pictures/image1.png" alt> <img
src="pictures/image2.png" alt> <img src="pictures/image3.jpg"
alt> <img src="pictures/image4.jpg" alt> <img
src="pictures/image5.jpg" alt> <br /> <br />
</div>
<div style="background-color: #b30000; height: 250px; width: 500% px">
<br />
<p>
<h1>
KFC<br> 299 Westmoreland St.<br> Dublin 2<br> Eircode:
D02 HK35<br> Ireland
</h1>
</p>
<br />
<h1>
<p>
Tel + 353 1 9999999<br> Fax + 353 1 6666666<br> Email
KFC#.ie
</p>
</h1>
</div>
</body>
</html>
CSS
font-size: 19px;
font-family: Calibri, arial, helvetica;
color: white;
padding: 0cm 0cm 0cm 1cm;
line-height: 1.3;
letter-spacing:1px;
}
h2 {
font-size: 30px;
font-family: Calibri, arial, helvetica, sans-serif;
color: Brack;
padding: 0cm 0cm 0cm 1cm;
line-height: 1.3;
text-align:center;
}
h3 {
font-size: 15px;
font-family: Calibri, arial, helvetica, sans-serif;
color: Brack;
padding: 0cm 0cm 0cm 11.5cm;
line-height: 1.3;
}
h4 {
font-size: 30px;
font-family: Calibri, arial, helvetica, sans-serif;
color: Brack;
padding: 0cm 0cm 0cm 4cm;
line-height: 1.3;
text-align:left;
float:left;
}
h5 {
font-size: 30px;
font-family: Calibri, arial, helvetica, sans-serif;
color: Brack;
padding-right: 6.5cm;
line-height: 1.3;
text-align:right;
}
*{margin:0; padding:0;}
.menu {
list-style:none;
border:1px solid #c0c0c0;
float:left;
text-align:center;
font-family: Calibri, arial, helvetica, sans-serif;
font-size: 20px
}
.menu li{
position:relative;
float:auto;
border-right:1px solid #c0c0c0;
}
.menu li a{color:#333; text-decoration:none; padding:5px 20px; display:block;}
.menu li a:hover{
background:#b30000;
color:#fff;
-moz-box-shadow:0 3px 10px 0 #CCC;
-webkit-box-shadow:0 3px 10px 0 #ccc;
text-shadow:0px 0px 5px #fff;
}
.menu li ul li{
border:1px solid #c0c0c0;
display:block;
width:150px;
}
#mainMenu {
width:1000px;
margin:0 auto;
list-style:none;
}
#mainMenu li {
float:left;
}
#mainMenu a {
display:block;
text-align:center;
width:150px; /
text-decoration:none;
}
#keyframes slidy {
0% { left: 0%; }
20% { left: 0%; }
25% { left: -100%; }
45% { left: -100%; }
50% { left: -200%; }
70% { left: -200%; }
75% { left: -300%; }
95% { left: -300%; }
100% { left: -400%; }
}
body { margin: 0; }
div#slider { overflow: hidden; }
div#slider figure img { width: 20%; float: left; }
div#slider figure {
position: relative;
width: 500%;
margin: 0;
left: 0;
text-align: middle;
font-size: 0;
animation: 30s slidy infinite;
}
div.vertical-line{
width: 1px;
background-color: silver;
height: 100%;
float: left;
border: 2px ridge silver ;
border-radius: 10px;
}
input[type=text], select, textarea {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
margin-top: 6px;
margin-bottom: 16px;
resize: vertical
}
input[type=submit] {
background-color: #b30000;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #b30000;
}
.container {
border-radius: 5px;
background-color: #808080;
padding: 20px;
width: 45%;
float: left;
font-size: 16px;
font-weight: 900;
font-family: Calibri, arial, helvetica, sans-serif;
letter-spacing:0.5px;
}
body {
background: white;
margin: 0;
font-family: monospace;
}
.gallery {
width: 90%;
margin: auto;
list-style: none;
padding: 20px;
box-sizing: border-box;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.gallery li {
margin: 5px;
}
.gallery img {
width: 200px;
height: 200px;
}
.modal {
display: none;
}
.modal:target {
display: block;
position: fixed;
background: rgba(0,0,0,0.8);
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.modal h3 {
color: #fff;
font-size: 30px;
text-align: center;
margin: 15px 0;
}
.imagen {
width: 100%;
height: 80%;
display: flex;
justify-content: center;
align-items: center;
}
.imagen a {
color: #fff;
font-size: 40px;
text-decoration: none;
margin: 0 10px;
}
.imagen a:nth-child(2) {
margin: 0;
height: 100%;
flex-shrink: 2;
}
.imagen img {
width: 500px;
height: 100%;
max-width: 100%;
border: 7px solid #fff;
box-sizing: border-box;
}
.cerrar {
display: block;
background: #fff;
width: 25px;
height: 25px;
margin: 15px auto;
text-align: center;
text-decoration: none;
font-size: 25px;
color: #000;
padding: 5px;
border-radius: 50%;
line-height: 25px;
}
.map {
float: right;
padding-right: 35px;
padding-bottom: 100px;
}
.divFooter {
background-color: #b30000;
height: 270px;
width: 500%;
float: left;
}
/* Style the list */
ul.breadcrumb {
padding: 10px 16px;
list-style: none;
background-color: #eee;
font-size: 17px;
}
/* Display list items side by side */
ul.breadcrumb li {
display: inline;
}
/* Add a slash symbol (/) before/behind each list item */
ul.breadcrumb li+li:before {
padding: 8px;
color: black;
content: "/\00a0";
}
/* Add a color to all links inside the list */
ul.breadcrumb li a {
color: #0275d8;
text-decoration: none;
}
/* Add a color on mouse-over */
ul.breadcrumb li a:hover {
color: #01447e;
text-decoration: underline;
}

text decoration rule not working?

I am designing my first site... the footer section to be specific. I am trying to style the <a> tags into a white color without the default webkit styling but I am unable to do so.
What am I doing wrong, and how can I change the styling?
* {
margin: 0px;
padding: 0px;
}
div {
display: block;
}
.header {
background-color: #333333;
}
.nav {
padding: 0px auto;
margin: 0px auto;
}
.nav ul {
}
.nav ul li {
color: #e6e6e6;
display: inline-block;
padding: 20px 30px 20px 20px ;
font-family: 'raleway', sans-serif;
font-weight: 20px;
}
.nav ul li a {
text-decoration: none;
color: #efefef;
padding: 20px 20px 20px 20px ;
font-family: 'raleway', sans-serif;
font-weight: 20px;
}
.nav ul li a:hover {
color: #efefef;
background-color: #191919;
transition: background .5s;
}
.second_section .container {
background-image: url(http://1.bp.blogspot.com/-I0jOcWYqW94/UdFZ9U8Si0I/AAAAAAAACRw/2Hhb0xY7yzY/s1600/84.jpg);
height: 900px;
width: 100%;
}
.copy {
position: absolute;
margin: 100px 50px 500px 500px;
color: white;
font-family: 'Josefin Sans', sans-serif;
letter-spacing: 2px
}
.copy {
text-align: center;
}
.btn_section {
top: 400px;
text-align: center;
position: relative;
}
.btn {
position: relative;
margin-top: 100px
color: white;
border: solid 2px fixed;
}
.btn_section a {
border: 1px solid white;
padding: 20px 40px;
text-decoration: none;
background-color: #191919;
color: white;
font-family: 'Open Sans', sans-serif;
font-size: 1.33em;
letter-spacing: 2px;
text-transform: uppercase;
}
.btn_section a:hover {
background-color: #e6e6e6;
color: #191919;
transition: background .5s;
cursor: pointer;
}
.third_section a: hover {
background-color: black;
}
.third_section {
height: 20px;
background-color: black;
}
.fourth_section .col {
display: inline-block;
padding-top: 50px;
padding-bottom: 75px;
padding-left: 6%;
padding-right: 6%;
text-align: center;
font-family: 'Raleway';
width: 20%;
vertical-align: top;
}
.fourth_section img {
padding: 5px 5px 10px 5px;
height: 32px
}
.fourth_section > h2 {
font-family: 'Raleway';
font-size: 1.33em;
}
.col > p {
font-size: 1.12em;
}
.col a {
text-decoration: none;
color: #323232;
}
.col {
text-align: center;
font-family: Garamond;
}
.footer {
height: 100px;
background-color: #333;
padding: 20px;
}
.footer a {
text-decoration: none;
}
.footer_info {
position: relative;
text-decoration: none;
margin-bottom: 10px;
color: white;
}
<div class="header">
<div class="nav">
<ul>
<li>ABOUT</li>
<li>WORK</li>
<li>TEAM</li>
<li>CONTACT</li>
</div>
</div>
<div class="second_section">
<div class="container">
<div class="copy">
<h1>ACTUATE CONTENT</h1>
<br>
<h3>Expert content for every business</h3>
</div>
<div class="btn_section">
Write For Me!
</div>
</div>
<div class="third_section">
</div>
<div class="fourth_section">
<div class="col">
<img src="https://cdn0.iconfinder.com/data/icons/seo-smart-pack/128/grey_new_seo2-17-256.png"><h2>RESEARCH</h2>
<br>
<p>Our meticulous research methods will uncover the most relevant information for your project. </p>
</div>
<div class="col">
<a href="#"><img src="https://cdn2.iconfinder.com/data/icons/55-files-and-documents/512/Icon_17-512.png">
<h2>WRITING</h2></a>
<br>
<p>Our seasoned, handpicked writers craft stellar content for your specific needs.</p>
</div>
<div class="col">
<a href="#"><img src="http://i.imgur.com/AinCaug.png">
<h2>EDITING</h2></a>
<br>
<p>Our editors work with leading authors and publishers to bring out the best in their writing.</p>
</div>
</div>
<div class="footer">
<div class="footer_info">
<p>Terms of Use / Privacy Policy</p>
</div>
</div>
Add your styles into this :
.footer .footer_info a {
...
}

How do i add a fading border to my nav bar CSS

I would like to add a line above and below my nav-bar that would fade out at the ends of it, like shown in the image below:
this is my HTML so far:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>My Portfolio - Home</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div id="header">
<h1>Alex Trotter</h1>
<ul id="nav">
<li>Home</li>
<img class="circle" title="circle" alt="circle" src="images/circle.png" />
<li>About Me</li>
<img class="circle" title="circle" alt="circle" src="images/circle.png" />
<li>Contact</li>
</ul>
</div>
<div id="content">
<div id="webInfo">
<p>Hi, my name is Alex Trotter and this is my portfolio website</p>
<p>below you will find some of work that I have created.</p>
<p>Above you can navigate to different pages to learn more about me.</p>
</div>
<div id="exampleWork1"></div>
<div id="exampleWork2"></div>
<div id="exampleWork3"></div>
</div>
</body>
And this is my CSS:
body {
display: block;
margin: 0;
padding: 0px;
}
#header {
background-color: #b9fee2;
width: 1920px;
height: 200px;
display: inline-block;
}
h1 {
font-family: Optima, Segoe, 'Segoe UI', Candara, Calibri, Arial, sans-serif;
font-size: 75px;
font-weight: 500;
text-align: center;
margin: 0px;
color: #000000;
text-decoration: none;
}
h1 a {
text-decoration: none;
}
h1 a:visited {
color: #000000;
text-decoration: none;
}
#nav {
display: inline-block;
-webkit-padding-start: 0px;
text-align: center;
margin: auto;
width: 100%;
}
#nav li {
display: inline-block;
vertical-align: top;
}
#nav a {
-webkit-transition: background-color 0.2s linear;
}
#nav a:link {
display: block;
text-align: center;
color: #000000;
text-decoration: none;
font-family: Georgia, Times, 'Times New Roman', serif;
font-size: 30px;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 50px;
padding-right: 50px;
}
#nav a:visited {
color: #000000;
}
#nav a:hover {
display: block;
text-align: center;
color: #000000;
background-color: #FFFFFF;
text-decoration: none;
padding-left: 50px;
padding-right: 50px;
font-size: 30px;
}
.circle {
padding-top: 25px;
}
Whenever I try to add a border to the nav-bar it goes across the entire screen, but if I make it so that the nav-bar border is only as big as it needs to be, the nav bar isn't in the center of the screen. What is the best way to solve this problem?
A couple of positioned pseudo-elements with a linear gradient background would be probably the simplest method.
Note: Your menu HTML is invalid, ul can only have li as direct children..not images, you can search SO for other options for menu dividers.
body {
margin: 0;
padding: 0px;
}
#header {
background-color: #b9fee2;
height: 200px;
text-align: center;
}
h1 {
font-family: Optima, Segoe, 'Segoe UI', Candara, Calibri, Arial, sans-serif;
font-size: 75px;
font-weight: 500;
text-align: center;
margin: 0px;
color: #000000;
text-decoration: none;
}
h1 a {
text-decoration: none;
}
h1 a:visited {
color: #000000;
text-decoration: none;
}
#nav {
display: inline-block;
-webkit-padding-start: 0px;
text-align: center;
margin: auto;
position: relative;
}
#nav::before,
#nav:after {
content: '';
position: absolute;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, .75) 50%, rgba(0, 0, 0, 0) 100%);
}
#nav::before {
top: 0;
}
#nav:after {
bottom: 0;
}
#nav li {
display: inline-block;
vertical-align: top;
}
#nav a {
-webkit-transition: background-color 0.2s linear;
}
#nav a:link {
display: block;
text-align: center;
color: #000000;
text-decoration: none;
font-family: Georgia, Times, 'Times New Roman', serif;
font-size: 30px;
padding-top: 10px;
padding-bottom: 10px;
padding-left: 50px;
padding-right: 50px;
}
#nav a:visited {
color: #000000;
}
#nav a:hover {
display: block;
text-align: center;
color: #000000;
background-color: #FFFFFF;
text-decoration: none;
padding-left: 50px;
padding-right: 50px;
font-size: 30px;
}
<div id="header">
<h1>Alex Trotter</h1>
<ul id="nav">
<li>Home
</li>
<li>About Me
</li>
<li>Contact
</li>
</ul>
</div>
in the CSS, add a hover:
#nav {
border-top: 2px solid blue;
border-bottom: 2px solid blue;
}
#nav.noHighlight {
background:transparent;
border-color:transparent;
}
then add a jQuery script, and put
setTimeout(function(){
$('#abc').fadeIn();
$('#abc').addClass('noHighlight');
},1000);