Unordered List Help! Need a solution to this - html

How can I remove the bullet and extra space before li.
I have tried list-style: none, but this just removed the bullet and the extra space still remains. Here is the jsFiddle.
I would like something like this.
.

The ul tag takes default padding which given by the browser so you have to remove it. By adding padding:0px.
/* --------------------------------------
Pricing & Plans
-------------------------------------- */
.pricing-title {
color: #272727;
text-align: center;
padding: 15px;
font-family: 'myriadbold';
border-bottom: 2px solid #ededed;
}
.pricing-price {
color: #4f4f4f;
text-align: center;
font-size: 80px;
margin-bottom: 20px;
}
.pricing-yr {
font-size: 20px;
font-family: 'myriadsemibold';
}
.price-bg ul {
list-style-type: none;
position: relative;
left: 0px;
border-top: 1px solid #eaeaea;
padding:0px;
}
.price-bg ul li {
position: relative;
padding: 16px 5px 16px 70px;
border-bottom: 1px solid #eaeaea;
}
.price-bg ul li:before {
font-family: "fontawesome";
content: "\f00d";
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
position: absolute;
top: 50%;
left: 0;
width: 52px;
font-size: 12px;
color: #ef662f;
text-align: center;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.price-bg ul li.tick:before {
font-family: "fontawesome";
content: '\f00c';
color: #7ab55c;
}
.price-bg ul li:after {
content: '';
display: block;
position: absolute;
top: 0;
left: 52px;
bottom: 0;
width: 1px;
background: #eaeaea;
}
.price-bg {
background-color: white;
border-radius: 7px;
width: 100%;
border: 1px solid #eaeaea;
-webkit-box-shadow: 0px 2px 4px 0px rgba(148,148,148,0.4);
-moz-box-shadow: 0px 2px 4px 0px rgba(148,148,148,0.4);
box-shadow: 0px 2px 4px 0px rgba(148,148,148,0.4);
}
<section class="container">
<h3>SUBHEADING</h3>
<h1>Simple Pricing for All</h1>
<div class="row">
<div class="col-sm-4">
<div class="price-bg">
<h3 class="pricing-title">BASIC PACKAGE</h3>
<h1 class="pricing-price">£150<span class="pricing-yr">yr</span></h1>
<ul>
<li class="tick">3x iBeacons<span>+ £30 for additional iBeacon</span></li>
</ul>
<p>APP FEATURES</p>
<ul>
<li class="tick">Smart Quiz</li>
<li>Educational Tasks</li>
<li>Interactive Gallery Game</li>
<li>Brand Customisation</li>
<li>Removed Watermark</li>
</ul>
<p>PACKAGE SUPPORT</p>
<ul>
<li>All Future Features/Content<span>+ exclusive content</span</li>
<li class="tick">Unlimited, free 24 hour support</li>
<li class="tick">Unlimited Users</li>
<li class="tick">Free Maintenance</li>
<li class="tick">No setup fees</li>
</ul>
<p>EXTRA ADD-ONS (OPTIONAL)</p>
<ul>
<li>Step by Step Videos</li>
<li>Content Request<span>(Our team will update the apps
content for you)</span></li>
<li>Workshop<span>+ step by step videos</span></li>
</ul>
</div>
</div>
<div class="col-sm-4">
<div class="price-bg">
</div>
</div>
<div class="col-sm-4">
<div class="price-bg">
</div>
</div>
</div>
</section>

just add padding-left 0
for (.price-bg ul)

add padding-left: 0px; to the .price-bg ul

It's because of the default margin and padding on list items.
Reset the margin and padding to 0 on .price-bg ul. Here is an updated fiddle
.price-bg ul {
list-style: none;
position: relative;
left: 0px;
margin: 0;
padding: 0;
border-top: 1px solid #eaeaea;
}

Adding to the other answers, if you are using bootstrap, you can add class:
class="list-unstyled"
To your UL.

Related

How to connect UL > LI list items in angular (without jquery)

I have elements in the li list and I want to connect them using a simple line so that it looks like a pipeline.
I want to implement pipeline like structure to these elements
The HTML I have prepared
<ul>
<li class="pipeline-box">New</li> ---
<li class="pipeline-box">Order Placed</li> ---
<li class="pipeline-box">Order confirmed</li>---
<li class="pipeline-box">In Process</li>---
<li class="pipeline-box">Ready For Dispatch</li>---
<li class="pipeline-box">On the Way</li>---
<li class="pipeline-box">Delivered</li>
</ul>
The CSS for pipeline-box
.pipeline-box {
border: 1px solid #696666;
width: fit-content;
padding: 6px;
background: #cccec9;
border-radius: 50px;
font-family: "avenir Medium";
font-size: 0.8rem !important;
}
I want it like this
You're not really using the ul/li feature so I'd suggest
.pipeline-box {
border: 1px solid #696666;
width: fit-content;
padding: 6px;
background: #cccec9;
border-radius: 50px;
font-family: "avenir Medium";
font-size: 0.8rem !important;
}
.list {
flex-direction: row;
box-sizing: border-box;
display: flex;
place-content: center space-around;
align-items: center;
}
<div class="list">
<div class="pipeline-box">New</div> ---
<div class="pipeline-box">Order Placed</div> ---
<div class="pipeline-box">Order confirmed</div>---
<div class="pipeline-box">In Process</div>---
<div class="pipeline-box">Ready For Dispatch</div>---
<div class="pipeline-box">On the Way</div>---
<div class="pipeline-box">Delivered</div>
</div>
Sidenote: using !important is usually viewed as bad practice, avoid it if you can
Just use the CSS pseudo-element :after. The --- connectors are just presentation elements, not part of your content and as such would be better separated from the code structure.
In the example below I used :last-child to remove the extra connector in the last element.
.pipeline-box {
display: inline-block;
}
.pipeline-box::after {
content: "---";
}
.pipeline-box:last-child::after {
display: none;
}
<ul class="list">
<li class="pipeline-box">New</li>
<li class="pipeline-box">Order Placed</li>
<li class="pipeline-box">Order confirmed</li>
<li class="pipeline-box">In Process</li>
<li class="pipeline-box">Ready For Dispatch</li>
<li class="pipeline-box">On the Way</li>
<li class="pipeline-box">Delivered</li>
</ul>
And by the way you don't necessarily need the "pipeline-box" class on every element (specially if all elements have the same class, there's no point), you could use the class already on the ul and target your objects using .list li, assuming all li elements in your list will be connected. Or add the pipeline-box class to the ul instead.
Added a span inside li which will contain the text and will be shown as bubble and then I made that link using the ::before of li.
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
.pipeline-box {
display: inline-block;
margin-bottom: 10px;
margin-right: -5px;
position: relative;
width: auto;
}
.pipeline-box::before {
background: #c5c5c5;
content: "";
height: 1px;
left: 32px;
position: absolute;
right: 0;
top: 50%;
z-index: 0;
}
.pipeline-box>span {
background: #f8f8f8;
border: 1px solid #c5c5c5;
border-radius: 50px;
display: inline-block;
font-family: "avenir Medium";
font-size: 0.8em !important;
line-height: 1em;
margin: 0 30px 0 0;
padding: 7px 12px;
position: relative;
z-index: 1;
}
.pipeline-box:last-child>span {
margin: 0;
}
<ul>
<li class="pipeline-box"><span>New</span></li>
<li class="pipeline-box"><span>Order Placed</span></li>
<li class="pipeline-box"><span>Order confirmed</span></li>
<li class="pipeline-box"><span>In Process</span></li>
<li class="pipeline-box"><span>Ready For Dispatch</span></li>
<li class="pipeline-box"><span>On the Way</span></li>
<li class="pipeline-box"><span>Delivered</span></li>
</ul>
I figured out the solution.
the HTML page is now
<ul class="pipeline-box">
<li><span>New</span></li>
<li><span>Order Placed</span></li>
<li><span>Order confirmed</span></li>
<li><span>In Process</span></li>
<li><span>Ready For Dispatch</span></li>
<li><span>On the Way</span></li>
<li><span>Delivered</span></li>
</ul>
and the SCSS is
.pipeline-box {
li{
align-content: center;
border: 1px solid #696666;
text-align: center;
width: 125px;
padding: 6px;
background: #f8f8f8;
border-radius: 50px;
font-family: "avenir Medium";
font-size: 0.8rem !important;
position: relative;
}
li:after{
content: '';
width: 17px;
height: 2px;
background-color: #afa4a4;
position: absolute;
z-index: 0;
top: calc(50% - 2px);
right: -18px;
}
li:before{
content: '';
width: 17px;
height: 2px;
background-color: #afa4a4;
position: absolute;
z-index: 0;
top: calc(50% - 2px);
left: -18px;
}
li:last-child:after {
display: none;
}
li:first-child::before {
display: none;
}
}
It looks like this now.
result

How to remove blank white space below footer?

I tried to eliminate the white space according to the answered questions that I found. But not of them is working on my side.
I tried to remove the padding in div's footer, but still the white space still there.
How to fix this?
CSS:
footer #bottom-footer{ background: url(/files/bg-testimonials.jpg) no-repeat; background-repeat: no-repeat; background-size: cover; box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.52); color: #000; text-align: left; padding: 50px 0 50px 0; font-size: 0.8125em; font-family: 'Open Sans', sans-serif; font-weight: 600; letter-spacing: normal; position: relative; left: 0; bottom: 0; height: auto; width: 100%; }
.footer-wrap a{ color: #000; }
.footer-wrap a:hover{ color: #d31716; }
.footer-logo a{ margin-bottom: 6px; display: block; }
.footer-socials{ float: none; line-height: 0; text-align: center; padding: 1em 0 2em;}
.footer-socials a{ border-radius: 100%; border: 3px solid #FFF; color: #FFF; display: inline-block; font-size: 1.25em; line-height: 2.50em; margin-left: 0.1em; text-align: center; vertical-align: middle; width: 2.50em; height: 2.50em; }
.footer-socials .social-icons span{ cursor: pointer; display: inline-block; }
.footer-socials .socials i{ -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; backface-visibility: hidden; }
.tagcloud a{ font-size: 13px !important; background: rgba(0,0,0,0.4); padding: 8px 10px; margin: 0 2px 4px 0; display: inline-block; line-height: 1; }
.sidebar .tagcloud a{ background: #23A38F; color: #FFF; }
.bottom-menu{ float: right; margin: 1em 4em 0 0; }
.bottom-menu ul{ list-style-type: none; font-size: 1.1125em; }
.bottom-menu ul li{ display: inline-block; font-family: 'Open Sans', sans-serif; font-weight: normal; line-height: 1.8; border-radius: 5px; border: 1px solid #CCC; box-shadow: 0 0 2px rgba(0,0,0,0.3); padding: 1em; margin: 0 0.10em 0 0; background: #FFF; color: #3e3e3e; }
.footerimg{ width:6em; }
.copyright{ margin: 2em 0 0 4em; }
.copyrighttext{ font-size: 1.08em; font-weight: 600; color: #B3B3B3; margin: 0 0 0 0.50em; }
#imgv ul{ list-style-type: none; letter-spacing: 1px; margin-top: -20px; font-size: 0.75em; }
#imgv ul li{ display: inline; }
.social-footer-mobile{ display: none; }
.footer-vertical-line{ border-top: 1px solid #8c8b8b;width: 9em; vertical-align: middle; position: relative; }
.left{ left: 32.50em; top: 1.65em; }
.right{ right: 32.50em; top: -1.45em; float: right; }
HTML:
<div id="bottom-footer" class="footer-menu">
<div class="ak-container">
<div class="footer-wrap clearfix">
<div class="footer-socials clearfix">
<div class="footer-vertical-line left"></div>
<div class="socials">
<span class="font-icon-social-facebook"></span>
<span class="font-icon-social-twitter"></span>
<span class="font-icon-social-youtube"></span>
<span class="font-icon-social-linkedin"></span>
</div>
<div class="footer-vertical-line right"></div>
</div>
<div class="footer-columns-4">
<ul>
<li>Products</li>
<li>All products</li>
<li>Standard loan</li>
<li>Promo loans</li>
<li>Insurance for loans</li>
</ul>
<ul>
<li>About Loans</li>
<li>How to apply</li>
<li>Our partner stores</li>
<li>Terms & Conditions</li>
<li>Safety guarantee</li>
</ul>
<ul>
<li>For Customers</li>
<li>Financial literacy</li>
<li>Payments & Guidelines</li>
<li>Menu</li>
<li>FAQ</li>
</ul>
<ul>
<li>Title</li>
<li>About us</li>
<li>News</li>
<li>Careers</li>
<li>Contacts</li>
</ul>
</div>
<nav role="navigation">
<div class="bottom-menu">
<ul class="footer-desktop-version">
<li><span class="footer-icon-cs icon-icon-support"></span>Customer Service: <strong>11111111</strong></li>
<li><span class="footer-icon-cs icon-icon-collection"></span>Collections <strong>1111111</strong></li>
</ul>
</div>
</nav>
<div class="copyright">
<img src="/files/footer.jpg" class="footerimg"><span class="copyrighttext"> All Rights Reserved ® 2017
Company Name</span>
</div><!-- .copyright -->
</div><!-- .footer-wrap -->
</div>
</div>
Your code shows nothing, perhaps you can't reveal your web address no problem.
You need to check something in your html any div or content area have minus value like top:-100px if you set something like this you need to change like margin-top:-100px
first you have to right click on the footer and click inspect
then you will see all the css applied to that particular element, select the parent element
check if bottom padding is applied to body or footer element
if you dont find bottom padding for footer or body element or other parent class of footer specify bottom padding in negative. (eg -5px)
note: you dont need to modify the css directly for testing purpose you can change and check the effect in debugging tool itself (f12 shortcut for debugging tool)
it should be something like:
(element name) { padding-bottom:-30px); }
also check for bottom margin if padding does not work.

How to Remove border-right for a last-child of a list items while using multiple un-ordered lists

I want to remove the last child border-right for a list a elements as follows, I tried with different types to remove it but is not working for this, kindly help me to solve this.
<header>
<div id="tag" >
<ul id="menu-item" class="nav">
<li id="item-1" class="item-type"> <a href="index.html"> Home </a</li>
<li id="item-2" class="item-type"> About Me </li>
<li id="item-3" class="item-type"> Contact </li>
<li id="item-4" class="item-type"> Map </li>
</ul>
</div>
<div id="head">
<ul id="ul-head">
<li id="head-1" > <img id="profile" src="Images/display.jpg" alt="profile" width="80px" height="80px" /> </li>
<li id="head-2" class="head-item"> TECHNOLOGIES </li>
<li id="head-3" class="head-item"> RESUME </li>
<li id="head-4" class="head-item"> FUTURE SCOPE </li>
<li id="head-5" class="head-item"> INTEREST </li>
</ul>
</div>
</header>
Applied CSS as follows :
#menu-item {
position: absolute;
display: block;
list-style-type: none;
float: right;
left: 850px;
padding: 9px 10px 9px 10px;
text-align: center;
margin: 0px
}
#menu-item > li {
float: left;
display: inline;
border-left: 1px solid #fff ;
padding: 1px 15px 1px 15px;
}
.item-type a {
color: #FFFFFF;
text-decoration: none;
}
#head #ul-head #head-1 a #profile {
position: absolute;
border-radius: 50%;
display: inline;
left: 140px;
top: 0px
}
.head-item {
position: relative;
font-size: 16px;
font-family: Arial;
font-weight: bold;
left: 230px;
top: 15px;
color: #778899;
}
#ul-head > li {
float: left;
display: inline;
border-right: 1px solid #000000;
padding: 1px 25px 1px 25px;
text-align: center;
}
#tag #menu-item li:first-child a {
border-left: none;
}
#head #ul-head li:last-child a {
border-right: none;
}
You dont have <a> tag in the #ul-head list
so you need to change your code to this :
#head #ul-head li:last-child{
border-right: none;
}
and for the items of the list #menu-item the border is used on the li tag so your css code should be like this:
#tag #menu-item li:first-child{
border-left: none;
}

Fixed position with hover

Well I have a navigation with a fixed position with a list inside, which I want to change color on a hover. But this doesn't work because of the fixed position of the navigation. Is there a way to get around this?
Here is my example
.nav {
position: fixed;
width: 100%;
height: 80px;
background-color: #ffffff;
box-shadow: 0px -2px 5px 1px;
}
.nav-inner {
position: relative;
width: 100%;
max-width: 1500px;
height: 80px;
margin-left: 50%;
transform: translate(-50%);
}
.nav-right {
float: right;
height: 100%;
}
.nav-menu {
position: relative;
top: 50%;
margin: -30px 130px 0px 0px;
height: 60px;
}
.nav-menu li {
list-style: none;
display: inline-block;
font-family: 'Open Sans', sans-serif;
font-size: 10pt;
padding: 20px;
}
.nav-menu li:last-child {margin: 0}
.nav-menu li:hover { cursor: pointer;}
.nav-left {
float: left;
color: #02c576;
font-family: 'Lato', sans-serif;
font-weight: 900;
font-size: 15pt;
letter-spacing: 4px;
height: 100%;
}
.logo {
position: relative;
height: 24px;
top: 50%;
margin: -12px 0px 0px 130px;
}
.nav-button {
display: none;
}
<div class="nav">
<div class="nav-inner">
<div class="nav-left">
<div class="logo">
<p>Company Name</p>
</div>
</div>
<div class="nav-right">
<div class="nav-menu">
<ol>
<li data-menu="Link1">Link1</li>
<li data-menu="Link2">Link2</li>
<li data-menu="Link3">Link3</li>
<li data-menu="Link4">Link3</li>
</ol>
</div>
</div>
<div class="nav-button">
<img src="Images/menu.png">
</div>
</div>
</div>
Thanks in advance!
Well after trying and trying I added a z-index in the .nav css and it worked... finally! I have no clear explanation for why it worked, but it worked for me.
There is no way currently in CSS alone to select a parent of a child.
The best way I can think of to do this, or at least the simplest would require a little JS.
Simple add a data attribute to your list items, and a JS event that on hover passes the value of the data attribute as a class to the fixed navigation. That class would control color.
Have a go yourself, if you struggle post some code and we can fix it.
Seems to work fine for me with your code (all I did was actually put the <a> tags inside the <li> elements, since that was what your code was targeting.)
.nav {
position: fixed;
width: 100%;
height: 80px;
background-color: #ffffff;
box-shadow: 0px -2px 5px 1px;
}
.nav-inner {
position: relative;
width: 100%;
max-width: 1500px;
height: 80px;
margin-left: 50%;
transform: translate(-50%);
}
.nav-right {
float: right;
height: 100%;
}
.nav-menu {
position: relative;
top: 50%;
margin: -30px 130px 0px 0px;
height: 60px;
}
.nav-menu li {
list-style: none;
display: inline-block;
font-family: 'Open Sans', sans-serif;
font-size: 10pt;
padding: 20px;
}
.nav-menu li:last-child {margin: 0}
.nav-menu li a:hover {
cursor: pointer;
color: red;
}
.nav-left {
float: left;
color: #02c576;
font-family: 'Lato', sans-serif;
font-weight: 900;
font-size: 15pt;
letter-spacing: 4px;
height: 100%;
}
.logo {
position: relative;
height: 24px;
top: 50%;
margin: -12px 0px 0px 130px;
}
.nav-button {
display: none;
}
<div class="nav">
<div class="nav-inner">
<div class="nav-left">
<div class="logo">
<p>Company Name</p>
</div>
</div>
<div class="nav-right">
<div class="nav-menu">
<ol>
<li data-menu="Link1"> <a href=#>Link1</a> </li>
<li data-menu="Link2"><a href=#>Link2</a></li>
<li data-menu="Link3"><a href=#>Link3</a></li>
<li data-menu="Link4"><a href=#>Link4</a></li>
</ol>
</div>
</div>
<div class="nav-button">
<img src="Images/menu.png">
</div>
</div>
</div>
well, you code works fine for me
js fiddle linke
I saw your code and if you don't want to use <a> tag you have to add
.nav-menu li:hover{
color:#fff;
}
simple code
nav { width: 100px; height: 80px; position: fixed; }
nav li { display: inline-block; }
nav li:hover { color: white; }
<nav>
<ul>
<li>dhh</li>
<li>fs</li>
<li>ss</li>
</ul>
</nav>
The simplest way I've tried is putting a filler element inside the first element, and target styling hover for that inner element.

CSS and HTML navbar list with image

I am semi-new to web development and am currently working on a webpage with a fixed top navbar. I have my logo in the center of a list and my links outside it. I would like the links to be vertically centered. I will include a screenshot and the code. Maybe you can help me? Thanks a lot! I appreciate your time.
Screenshot of Navbar
HTML:
<div class="header">
<div class="table">
<div class="navbar">
<ul>
<li>Home</li>
<li>About</li>
<li>Before & After</li>
<li><img src="photos/logo.png"> </li>
<li>Portfolio</li>
<li>Facebook</li>
<li> <script src="js/email.js"></script>
</ul>
</div>
</div>
</div>
CSS:
#font-face {
font-family: offbeat;
src: url(offbeat.woff);
font-weight: normal;
font-style: normal;
}
body {
margin: 0 auto;
padding: 0;
background: rgb(209,202,178);
}
.header {
background: rgb(175,166,135);
width: 100%;
height: 100px;
margin: 0px;
padding: 0px;
position: fixed;
top: 0px;
z-index: 2;
border-bottom: 1px solid rgb(102,102,102);
}
.table {
display: table;
float: left;
left: 50%;
width: 1150px;
height: 100px;
line-height: 100px;
overflow: auto;
position: absolute;
}
.logo img {
z-index: 4;
position: relative;
left: 50%;
}
.navbar {
float: left;
right: 48.5%;
position: relative;
}
.navbar li {
display: inline;
padding: 0px;
margin: 0 auto;
width: 100%;
margin-right: 40px;
text-shadow: 1px 1px rgb(115,109,88);
font-family: offbeat;
font-size: 20px;
letter-spacing: 5px;
white-space: nowrap;
overflow: auto;
}
.navbar a {
text-decoration: none;
color: rgb(255,255,255);
text-align: center;
border-bottom: 1px solid;
border-color: rgb(255,255,255);
padding: 10px;
margin: 5px;
white-space: nowrap;
}
.navbar a:hover {
background-color: rgb(135,127,99);
}
I would look to use line-height to achieve this. Set the height on the parent container .navbar to 100px then set a line-height of 100px on the .navbar li.
This will mean the link text is always in the centre of the navbar. To ensure the logo was in the centre I would add vertical align middle.
As a bonus I would look to implement box-sizing it greatly helps with layouts that use padding.
#font-face {
font-family: offbeat;
src: url(offbeat.woff);
font-weight: normal;
font-style: normal;
}
*,
*:before,
*:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
margin: 0 auto;
padding: 0;
background: rgb(209, 202, 178);
}
.header {
background: rgb(175, 166, 135);
width: 100%;
height: 100px;
margin: 0px;
padding: 0px;
position: fixed;
top: 0px;
z-index: 2;
border-bottom: 1px solid rgb(102, 102, 102);
}
.navbar {
margin: 0;
padding: 0;
text-align: center;
}
.navbar ul {
margin: 0;
padding: 0;
overflow: hidden;
}
.navbar li {
display: inline-block;
padding: 0px;
margin-right: 40px;
text-shadow: 1px 1px rgb(115, 109, 88);
font-family: offbeat;
font-size: 20px;
letter-spacing: 5px;
line-height: 100px;
vertical-align: middle;
}
.navbar img {
vertical-align: middle;
}
.navbar a {
text-decoration: none;
color: rgb(255, 255, 255);
text-align: center;
border-bottom: 1px solid;
border-color: rgb(255, 255, 255);
padding: 10px;
margin: 5px;
white-space: nowrap;
}
.navbar a:hover {
background-color: rgb(135, 127, 99);
}
<div class="header">
<div class="navbar">
<ul>
<li>Home
</li>
<li>About
</li>
<li>Before & After
</li>
<li>
<img src="http://placehold.it/50x50">
</li>
<li>Portfolio
</li>
<li>Facebook
</li>
<li>
<script src="js/email.js"></script>
</ul>
</div>
</div>
I edit your base code as you used a lot of needed positioning techniques. Please compare with your code.
try adding this to your css
.navbar ul
{
display:inline;
vertical-align:middle;
}
Let the ul padding:20px 0px; direct the center vertically and text-align:center direct your center horizontally. Also use inline-block so that you can give your entire li focus for menu linking purposes
here is your problem solved FIDDLE
p.s. Your main problem is you are using way too much css. This is not supposed to be such a hard implementation and you definitely do not need absolute positioning, but fixed positioning. The rest is just colors.
If you need to give more padding to the top so they look closer to the bottom, use the padding property to distribute the padding as needed (i.e. padding: 40px 0px 5px) etc.
Here is a common saying we have...Use "absolute" only when "absolutely" necessary ;)
heres how i did it.
core change on css:
.navbar {
display:table;
margin: 15px auto;
}
.navbar li {
line-height:70px;
display: block;
padding: 0px;
float:left;
margin: 0 auto;
margin-right: 40px;
text-shadow: 1px 1px rgb(115,109,88);
font-family: offbeat;
font-size: 20px;
letter-spacing: 5px;
white-space: nowrap;
}
simplified html:
<div class="header">
<ul class="navbar">
<li>Home</li>
<li>About</li>
<li>Before & After</li>
<li><img src="http://img1.wikia.nocookie.net/__cb20120630091052/farmville2/images/0/0f/Google-Logo.png" height=70px /></li>
<li>Portfolio</li>
<li>Facebook</li>
</ul>
<script src="js/email.js"></script>
</div>
http://jsfiddle.net/4a8dkz3n/
i messed around a bit on jsfiddle so it might be a bit different,
but basically i gave display:table to so that i can give "margin:0 auto;" to it
and used 'line-height' to vertical alignment of the list menu.
also simplified the code a bit.