I am trying to get my icons and text to have same padding or margin. If you run the code you will see one category is near an icon and other one is far. I want to have consistency. I tried a lot of things but it doesnt reflect anything
.category_nav
{
height: 40px;
margin-top: 38px;
}
.category_nav_ul
{
list-style-type: none;
padding:0;
}
.category_nav_ul > li
{
display: inline-block;
}
#category_nav_ul_category
{
width: 380px;
cursor: pointer;
}
#category_nav_div
{
margin-top: 5px;
width: 380px;
position: absolute;
background-color: white;
padding-bottom: 10px;
}
#categories_content
{
margin-top: 10px;
}
.category_nav_div .content:hover
{
}
.categories
{
list-style: none;
}
.category
{
padding-top: 6px;
padding-bottom: 6px;
margin-bottom: 1px;
border: 0;
border-radius: 0;
}
.category:hover
{
border: 2px;
background:linear-gradient(to right, red 0px, red 3px, transparent 3px);
background-color: white;
border-top: 1px solid grey;
border-bottom: 1px solid grey;
}
.category_icon
{
width: 20px !important;
padding-right: 5px;
background-color: red;
}
.category_content
{
margin-left: 15px !important;
}
.light-border
{
border: 1px solid #e8e8e8;
border-top: none;
}
h2.flash_title
{
color: rgb(120, 120, 120);
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
background: #fff;
color: #666;
font-size: 14px;
padding-left: 19px;
font-weight: 400;
}
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div id="category_nav_div" class="light-border">
<div class="content" id="categories_content">
<ul class="categories list-group">
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-camera"></i>
</span>
<span class="category_content">
Camera
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-info-circle"></i>
</span>
<span class="category_content">
Clothes
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-mobile"></i>
</span>
<span class="category_content">
Mobiles
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-info-circle"></i>
</span>
<span class="category_content">
Graphics Cards
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-television"></i>
</span>
<span class="category_content">
Television
</span>
</li>
</ul>
</div>
</div>
In i tag you can use a class fa-fw, so all the icons has the same width
Example
<i class="fa fa-television fa-fw"></i>
add this class in all the i tags
.category_nav
{
height: 40px;
margin-top: 38px;
}
.category_nav_ul
{
list-style-type: none;
padding:0;
}
.category_nav_ul > li
{
display: inline-block;
}
#category_nav_ul_category
{
width: 380px;
cursor: pointer;
}
#category_nav_div
{
margin-top: 5px;
width: 380px;
position: absolute;
background-color: white;
padding-bottom: 10px;
}
#categories_content
{
margin-top: 10px;
}
.category_nav_div .content:hover
{
}
.categories
{
list-style: none;
}
.category
{
padding-top: 6px;
padding-bottom: 6px;
margin-bottom: 1px;
border: 0;
border-radius: 0;
}
.category:hover
{
border: 2px;
background:linear-gradient(to right, red 0px, red 3px, transparent 3px);
background-color: white;
border-top: 1px solid grey;
border-bottom: 1px solid grey;
}
.category_icon
{
width: 20px !important;
padding-right: 5px;
background-color: red;
}
.category_content
{
margin-left: 15px !important;
}
.light-border
{
border: 1px solid #e8e8e8;
border-top: none;
}
h2.flash_title
{
color: rgb(120, 120, 120);
font-weight: bold;
text-transform: uppercase;
letter-spacing: 1px;
background: #fff;
color: #666;
font-size: 14px;
padding-left: 19px;
font-weight: 400;
}
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<div id="category_nav_div" class="light-border">
<div class="content" id="categories_content">
<ul class="categories list-group">
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-camera"></i>
</span>
<span class="category_content">
Camera
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-info-circle"></i>
</span>
<span class="category_content">
Clothes
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-mobile"></i>
</span>
<span class="category_content">
Mobiles
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-info-circle"></i>
</span>
<span class="category_content">
Graphics Cards
</span>
</li>
<li class="category list-group-item">
<span class="category_icon">
<i class="fa fa-fw fa-television"></i>
</span>
<span class="category_content">
Television
</span>
</li>
</ul>
</div>
</div>
Font-awesome has a class specially to do that. fa-fw
<div class="list-group">
<a class="list-group-item" href="#"><i class="fa fa-home fa-fw" aria-hidden="true"></i> Home</a>
<a class="list-group-item" href="#"><i class="fa fa-book fa-fw" aria-hidden="true"></i> Library</a>
<a class="list-group-item" href="#"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> Applications</a>
<a class="list-group-item" href="#"><i class="fa fa-cog fa-fw" aria-hidden="true"></i> Settings</a>
</div>
http://fontawesome.io/examples/
Related
i am getting a problem on hover, i want to give effects on hover for a single icon without affecting others
i am using
.follow {
display: flex;
font-family: 'Rubik', serif;
}
.follow1 {
font-size: 20px;
padding-right: 50px;
}
.icon i {
font-size: 2em;
padding-right: 45px;
}
.icon i:hover {
font-size: 2.5em;
transform: rotate(15deg);
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/js/all.min.js"></script>
<div class="follow">
<p class="follow1">Follow Us on:</p>
<div class="icon">
<i class="fab fa-facebook-f" style="color: rgb(11,134,238)"></i>
<i class="fab fa-instagram" style="color:rgb(193,50,158)"></i>
<i class="fab fa-twitter" style="color: rgb(29,161,242)"></i>
<i class="fab fa-google-plus-g" style="color: rgb(221,77,66)"></i>
</div>
</div>
Wrap your icons with a span. And use CSS variables to assign a special color for each.
.follow {
display: flex;
font-family: 'Rubik', serif;
}
.follow1 {
font-size: 20px;
padding-right: 50px;
}
.icon span {
font-size: 2em;
padding-right: 45px;
display: inline-block;
transition: .2s;
}
.icon span:hover {
color: var(--color);
transform: rotate(15deg);
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/js/all.min.js"></script>
<div class="follow">
<p class="follow1">Follow Us on:</p>
<div class="icon">
<span style="--color: rgb(11,134,238)"><i class="fab fa-facebook-f"></i></span>
<span style="--color: rgb(193,50,158)"><i class="fab fa-instagram"></i></span>
<span style="--color: rgb(29,161,242)"><i class="fab fa-twitter"></i></span>
<span style="--color: rgb(221,77,66)"><i class="fab fa-google-plus-g"></i></span>
</div>
</div>
.follow {
display: flex;
font-family: 'Rubik', serif;
}
.follow1 {
font-size: 20px;
padding-right: 50px;
}
.icon i {
font-size: 2em;
padding-right: 45px;
}
.fa-instagram:hover {
font-size: 2.5em;
transform: rotate(15deg);
display:inline-block;
}
.icon{
display:flex;}
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/js/all.min.js"></script>
<div class="follow">
<p class="follow1">Follow Us on:</p>
<div class="icon">
<i class="fab fa-facebook-f" style="color: rgb(11,134,238)"></i>
<i class="fab fa-instagram" style="color:rgb(193,50,158)"></i>
<i class="fab fa-twitter" style="color: rgb(29,161,242)"></i>
<i class="fab fa-google-plus-g" style="color: rgb(221,77,66)"></i>
</div>
</div>
Icon class put in every (i-tag class) before (fab) class
I'm creating a nav bar with buttons using css that I'd like to have a background color on hover WITHOUT the div resizing. I want the buttons to stay in place, just have the background color behind them.
.topnav {
overflow: hidden;
background-color: #1C313A;
}
.topnav a {
float: left;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav-right {
float: right;
}
button {
padding: 0px 0px;
background-color: transparent;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease 0s;
margin-left: 20px;
}
button:hover {
width: 50px;
height: 50px;
background-color: #192C34;
border-radius: 50%;
padding: 0px 0px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="topnav">
<a href="#home">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<a href="#news"><button>
<i class="fa fa-upload fa-lg"></i>
</button></a>
<a href="#contact">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<div class="topnav-right">
<a class="logo" style="pointer-events:none;">TidyBlocks</a>
</div>
</div>
Current Output:
Desired Output
.topnav {
overflow: hidden;
background-color: #1C313A;
}
.topnav a {
float: left;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav-right {
float: right;
}
button {
padding: 0px 0px;
background-color: transparent;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease 0s;
margin-left: 20px;
width: 50px;
height: 50px;
}
button:hover {
background-color: #192C34;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="topnav">
<a href="#home">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<a href="#news"><button>
<i class="fa fa-upload fa-lg"></i>
</button></a>
<a href="#contact">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<div class="topnav-right">
<a class="logo" style="pointer-events:none;">TidyBlocks</a>
</div>
</div>
Please put height and width in button not hover.
And yes you can't put button element in a tag it's not validated.
Please check your code on https://validator.w3.org/.
.topnav {
overflow: hidden;
background-color: #1C313A;
}
.topnav a {
float: left;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav-right {
float: right;
}
button {
border-radius: 50%;
padding: 0px 0px;
background-color: transparent;
border: none;
border-radius: 50px;
cursor: pointer;
transition: all 0.3s ease 0s;
margin-left: 20px;
width: 50px;
height: 50px;
}
button:hover {
background-color: #192C34;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="topnav">
<a href="#home">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<a href="#news"><button>
<i class="fa fa-upload fa-lg"></i>
</button></a>
<a href="#contact">
<button>
<i class="fa fa-save fa-lg"></i>
</button>
</a>
<div class="topnav-right">
<a class="logo" style="pointer-events:none;">TidyBlocks</a>
</div>
</div>
Just doing some practice by recreating the tumblr website, Im having some issues with the right side where it says "Recommended Blogs". I want to implement the use of a small user icon logo instead of the list style bullet. Is it possible to resize the images in css? or would i have to resize the image in photoshop?
Take a look at My Code pen
HTML
<html>
<head>
<title>Tumblr</title>
<script defer src="https://use.fontawesome.com/releases/v5.0.6/js/all.js"></script>
<link rel="stylesheet" type="text/css" href="tumblrstyle.css">
</head>
<body>
<!-- Header Navigation -->
<div class="top-head">
<header>
<div id="top-head-left">
<h1>T</h1>
<input type="text" name="" placeholder="">
<i class="fas fa-search"></i>
</div>
<div id="top-head-right">
<i class="fas fa-home fa-2x"></i>
<i class="far fa-compass fa-2x"></i>
<i class="fas fa-envelope fa-2x"></i>
<i class="far fa-comment fa-2x"></i>
<i class="fas fa-bolt fa-2x"></i>
<i class="fas fa-user fa-2x"></i>
</div>
</header>
</div>
<!-- End Header -->
<!-- RightBar -->
<div class="container">
<div class="right-side">
<div class="right-side nav">
<h3>Recommended Blogs</h3>
<ul id="navi">
<li>empty</li>
<li>empty</li>
<li>empty</li>
<li>empty</li>
</ul>
</div>
<div class="radar">
<h3>radar</h3>
<ul>
<li>empty</li>
<p>
</p>
</ul>
</div>
</div>
<!-- Post Controls -->
<div class="controller">
<img src="https://image.freepik.com/free-vector/abstract-summer-sun-logo- design_1436-184.jpg">
<div class="post-group">
<div class="icons">
<i class="fas fa-home fa-5x"></i>
</div>
<div class="icons">
<i class="far fa-compass fa-5x"></i>
</div>
<div class="icons">
<i class="fas fa-envelope fa-5x"></i>
</div>
<div class="icons">
<i class="far fa-comment fa-5x"></i>
</div>
<div class="icons">
<i class="fas fa-bolt fa-5x"></i>
</div>
<div class="icons">
<i class="fas fa-user fa-5x"></i>
</div>
</div>
</div>
</body>
</html>
CSS
/*Reset*/
* {
margin: 0;
padding: 0;
}
body {
background: lightgray;
}
header {
padding: 0 10px;
}
header h1 {
display: inline;
margin-right: 15px;
}
.container {
width: 60%;
margin: auto;
overflow: visible;
}
div h3 {
border-bottom: 1px solid black;
}
/*Header*/
.top-head {
background: lightblue;
height: 60px;
border-bottom: 5px solid black;
padding: 0px 20px;
}
#top-head-left {
float: left;
padding-top: 5px;
}
#top-head-left input[type="text"] {
width: 200px;
background: yellow;
padding: 5px 0px;
}
#top-head-right {
float: right;
padding-top: 12px;
}
/*RightsideBar*/
.right-side {
float: right;
}
.nav ul {
list-style-image: url('https://78.media.tumblr.com/avatar_0f16d6a6a019_128.pnj');
}
.nav ul li {
}
.radar ul {
list-style: none;
}
/*Post Controller*/
.controller {
margin-top: 50px;
}
.controller img {
width: 10%;
float: left;
margin-right: 20px;
border-radius: 10px;
}
.post-group {
float: left;
background: white;
height: 68px;
border-radius: 10px;
padding-top: 8px;
padding-bottom: 22px;
}
.icons {
float: left;
}
.icons a {
color: orange;
padding: 0 12px;
}
/* https://78.media.tumblr.com/avatar_3aed9115be2f_128.pnj
https://78.media.tumblr.com/avatar_0f16d6a6a019_128.pnj
https://78.media.tumblr.com/avatar_0f16d6a6a019_128.pnj
https://78.media.tumblr.com/avatar_996dede0302e_128.pnj */
#navi {
list-style-type: none;
}
#navi > li::before {
content: '';
display: inline-block;
height: 40px;
width: 40px;
background-size: 40px;
background-image: url('https://78.media.tumblr.com/avatar_0f16d6a6a019_128.pnj');
background-repeat: no-repeat;
margin-right: 10px;
background-position: center center;
vertical-align: middle;
}
Please don't mind my selectors
I have some buttons in a bootstrap 4 list that I set to btn-block but for some reason the last one is a bit wider than the others. I'm not certain why since the CSS that has been added doesn't change the width or anything. Any clues? In the attached pic it's the Instagram button. Code will be below the image.
<header class="construction-header">
<div class="container">
<div class="construction-message">
<h1><img src="http://jessetoxik.com/img/header/logo/logo_temp.png"></h1>
<h3 class="fjalla">Webpage Coming Soon</h3>
<h3 class="release fjalla"></h3>
<hr class="construction-divider">
<ul class="list-inline construction-social-buttons fjalla">
<li class="list-inline-item">
<a href="https://example.com" class="btn btn-secondary btn-lg btn-drk btn-block">
<i class="fa fa-twitter fa-fw"></i>
<span class="network-name">Twitter</span>
</a>
</li>
<li class="list-inline-item">
<a href="https://www.example.com/" class="btn btn-secondary btn-lg btn-drk btn-block">
<i class="fa fa-facebook fa-fw"></i>
<span class="network-name">Facebook</span>
</a>
</li>
<li class="list-inline-item">
<a href="https://www.example.com" class="btn btn-secondary btn-lg btn-drk btn-block">
<i class="fa fa-instagram fa-fw"></i>
<span class="network-name">Instagram</span>
</a>
</li>
</ul>
</div>
</div>
</header>
body, html {
width: 100%;
height: 100%;
}
body, h1, h2, h3, h4, h5, h6 {
font-weight: 700;
text-shadow:
-1px -1px 0 #000,
1px -1px 0 #000,
-1px 1px 0 #000,
1px 1px 0 #000!important;
}
.construction-header {
padding-top: 50px;
padding-bottom: 50px;
text-align: center;
height: 100%;
color: #f8f8f8;
background: url('imagesrc') no-repeat center center;
background-size: cover;
}
.construction-message {
position: relative;
padding-top: 20%;
padding-bottom: 20%;
}
.construction-message>h1 {
margin: 0;
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
font-size: 5em;
}
.construction-divider {
width: 400px;
border-top: 1px solid #f8f8f8;
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}
.construction-message>h3 {
text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.6);
}
.construction-social-buttons i {
font-size: 80%;
}
#media(max-width:767px) {
.construction-message {
padding-bottom: 15%;
}
.construction-message>h1 {
font-size: 3em;
}
ul.construction-social-buttons>li {
display: block;
margin-bottom: 20px;
padding: 0;
}
ul.construction-social-buttons>li:last-child {
margin-bottom: 0;
}
.construction-divider {
width: 100%;
}
}
.btn-drk {
background-color: #232323!important;
}
Without seeing a working sample it's difficult to properly test. One alternative that I found was to use Bootstrap's Grid instead of .list-inline for arranging the buttons. It provides all of the flexibility of their displaying in a single row versus stacked based on the device width.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" type="text/css" rel="stylesheet">
<div class="container">
<div class="row">
<div class="col-12 col-sm-4 my-2">
<i class="fa fa-twitter fa-fw"></i><span class="network-name">Twitter</span>
</div>
<div class="col-12 col-sm-4 my-2">
<i class="fa fa-facebook fa-fw"></i><span class="network-name">Facebook</span>
</div>
<div class="col-12 col-sm-4 my-2">
<i class="fa fa-instagram fa-fw"></i><span class="network-name">Instagram</span>
</div>
</div>
</div>
This is my problem,
I have a website with some content, and i want the header to be 100% width of the browser, and some content that's wrapped inside wrapper to make it about.. 50% of the browser width.
Then we have something like this:
But, we're adding a menu aswell. This is done with UL, and we cant just add the menu (i think), because the content of the menu is going to be in the wrapper. So it looks like this:
What have i tried?
I've given the element header/menu this css:
padding-left: 3000px;
margin-left: -3000px;
padding-right: 3000px;
margin-right: -3000px;
I also added overflow-x:hidden; on the body element so they cant scroll x wise. But on their phones, they can. So this makes everything "unresponsive"
HTML:
<html>
<title>Rocket League Prices - Home</title>
<body>
<div class="wrapper">
<header>
<a href="/index.php">
<div class="header-1">
Rocket League Prices
</div>
</a>
</header>
<ul class="nav-top">
<li class="nav-top"><a href="/index.php" title="HOME" class="nav-top">
<i class="fa fa-home fa-lg" aria-hidden="true" ></i><br><span class="meny-text">Home</span></a></li>
<li class="nav-top"><a href="/pc.php" title="PC PRICE LIST" class="nav-top">
<i class="fa fa-desktop fa-lg" aria-hidden="true"></i><br><span class="meny-text">PC list</span></a></li>
<li class="nav-top"><a href="/ps4.php" title="PS4 PRICE LIST" class="nav-top">
<i class="fa fa-gamepad fa-lg" aria-hidden="true"></i><br><span class="meny-text">PS4 list</span></a></li>
<li class="nav-top"><a href="/certified.php" title="CERTIFIED LIST" class="nav-top">
<i class="fa fa-certificate" aria-hidden="true"></i><br><span class="meny-text">Certified list</span></a></li>
<li class="nav-top" style="float:right;!important" >
<a href="#" class="nav-top meny-text" data-toggle="modal" data- target="#modal-staff">
<i class="fa fa-envelope-o" aria-hidden="true"></i> <br>Staff</a></li>
</ul>
<div class="modal fade" id="modal-staff" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
CSS:
body{
overflow-x: hidden;
}
header{
padding: 20px;
background-color: #1798e5;
color: black;
padding-left: 3000px;
margin-left: -3000px;
padding-right: 3000px;
margin-right: -3000px;
}
ul.nav-top {
background-color: white;
margin-left: auto;
margin-right: auto;
padding: 0;
margin-top: 0 auto;
float:left;
color: #34495e;
display:table-row;
text-align: center;
width: 100%;
margin: 0;
margin-bottom: 15px;
list-style-type: none;
padding-left: 3000px;
margin-left: -3000px;
padding-right: 3000px;
margin-right: -3000px;
}
li a.nav-top{
color: #34495e;
text-decoration: none;
padding: 20px 20px;
}
li a.nav-top:hover{
background-color: #f1f2f3;
color: #1798e5;
}
li.nav-top {
text-decoration: none;
float: left;
}
.wrapper{
max-width: 1000px;
margin-left: auto;
margin-right: auto;
}
CODEPEN: http://codepen.io/anon/pen/QdLpzM
Your html has to change a bit.
<html>
<title>Rocket League Prices - Home</title>
<body>
<header>
<div class="column">
<a href="/index.php">
<div class="header-1">
Rocket League Prices
</div>
</a>
</div>
</header>
<div class="column">
<ul class="nav-top ">
<li class="nav-top">
<a href="/index.php" title="HOME" class="nav-top">
<i class="fa fa-home fa-lg" aria-hidden="true"></i>
<br><span class="meny-text">Home</span>
</a>
</li>
<li class="nav-top">
<a href="/pc.php" title="PC PRICE LIST" class="nav-top">
<i class="fa fa-desktop fa-lg" aria-hidden="true"></i>
<br><span class="meny-text">PC list</span>
</a>
</li>
<li class="nav-top">
<a href="/ps4.php" title="PS4 PRICE LIST" class="nav-top">
<i class="fa fa-gamepad fa-lg" aria-hidden="true"></i>
<br><span class="meny-text">PS4 list</span>
</a>
</li>
<li class="nav-top">
<a href="/certified.php" title="CERTIFIED LIST" class="nav-top">
<i class="fa fa-certificate" aria-hidden="true"></i>
<br><span class="meny-text">Certified list</span>
</a>
</li>
<li class="nav-top" style="float:right;!important">
<a href="#" class="nav-top meny-text" data-toggle="modal" data-target="#modal-staff">
<i class="fa fa-envelope-o" aria-hidden="true"></i>
<br>Staff</a>
</li>
</ul>
</div>
</body>
and your css
.column {
max-width: 1000px;
margin-left: auto;
margin-right: auto;
}
header {
padding: 20px 0;
background-color: #1798e5;
color: black;
width: 100%;
display: block;
}
ul.nav-top {
background-color: white;
padding: 0;
float: left;
color: #34495e;
display: table-row;
text-align: center;
width: 100%;
margin: 0;
margin-bottom: 15px;
list-style-type: none;
}
li a.nav-top {
color: #34495e;
text-decoration: none;
padding: 20px 20px;
}
li a.nav-top:hover {
background-color: #f1f2f3;
color: #1798e5;
}
li.nav-top {
text-decoration: none;
float: left;
}