I'm working on a costume admin dashboard for my SPA project. I have the following codes for sidebar section:
HTML:
<div class="sidebar">
<div class="logo_content">
<div class="logo">
<i class='bx bxl-c-plus-plus'></i>
<div class="logo_name">CodeX</div>
</div>
<i class='bx bx-menu' id="btn"></i>
</div>
<div class="items-list">
<ul class="nav-list">
<li>
<a href="#">
<i class='bx bxs-grid-alt'></i>
<span class="links_name">Dashboard</span>
</a>
</li>
</ul>
<ul class="nav-list">
<li>
<a href="#">
<i class='bx bxs-user'></i>
<span class="links_name">User</span>
</a>
</li>
</ul>
.
.
<-- uls come here -->
.
.
.
</div>
</div>
CSS:
.sidebar .items-list{
height: calc(100% - 130px);
overflow-y: scroll;
overflow-x: hidden;
}
.sidebar ul{
margin-top: 20px;
}
.sidebar ul li{
position: relative;
height: 50px;
width: 100%;
margin: 0 5px;
list-style: none;
line-height: 50px;
}
.sidebar ul li a{
color: #fff;
display: flex;
align-items: center;
text-decoration: none;
border-radius: 12px;
transition: all .4s ease;
}
.sidebar ul li a:hover{
color: #11101d;
background: #fff;
}
.sidebar ul li a i{
height: 50px;
min-width: 50px;
border-radius: 12px;
line-height: 50px;
text-align: center;
font-size: 30px;
}
The styled page is:
I want to move the scrollbar to the right edge of the sidebar. Currently, there is some gap between the sidbar edge and the scrollbar.
I have studied some related questions such as this and this, but I could not implement them in my own problem.
How can I do that?
I solved my own problem by modifying these styles:
.sidebar ul li a{
color: #fff;
display: flex;
align-items: center;
text-decoration: none;
border-radius: 12px;
transition: all .4s ease;
margin-right: 12px;
}
.sidebar{
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 240px;
background-color: #11101d;
padding: 6px 2px;
}
Related
I have an unordered linked list. I'm trying to shift one of the items in the navigation all the way to the right (Order) as if it had text-align: right;. I tried using float: right; and text-align: right;, but none of them seemed to work. If I set the margin-left to a really high number (such as 100px) it does shift to the right, but if I resize my window then I can't see it anymore or it's not on the right side of the page. Here is the HTML:
nav {
position: fixed;
}
.navigation-links-no-style a {
text-decoration: none;
position: relative;
margin: 15px;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
}
li {
float: left;
}
.navigation-links li {
padding-top: 1.3em;
}
.navbar {
overflow: hidden;
position: fixed;
top: 0;
width: 100%;
border-bottom: solid 1px black;
background: white;
padding-left: 5em;
}
.navbar a {
float: left;
display: block;
text-align: center;
padding: 14px 16px;
text-decoration: none;
margin-left: 20px;
color: black;
font-size: 14pt;
}
.order {
color: #FFFFFF !important;
background: #1419e2;
text-decoration: none;
padding: 8px;
border-radius: 5px;
margin-top: 15px;
}
<div class="navbar">
<a class="glacier-hills" href="glacier_hills.html">
<img src="Images/Glacier-Hills-Logo.svg" alt="" width="182" height="90">
</a>
<ul class="navigation-links">
<div class="navigation-links-no-style">
<li>
<a class="menu" href="menu.html">Menu</a>
</li>
<li>
<a class="location" href="location.html">Hours and Location</a>
</li>
</div>
<li>
<a class="order" href="order.html">Order</a>
</li>
</ul>
</div>
Any help would be greatly appreciated. Thanks!
Assuming you're looking to move your .order element, you'll want to apply the float: right rule to the parent (<li>) element. I've added a class to this, .order-container, to make this easier to achieve in the following example.
Note also that once you float to the right, it will be off the screen by default. You'll want to set a negative margin-right to circumvent this. I've gone with margin-right: -10em in the following, to match the offset from the image on the left.
Ultimately, you may wish to consider using a framework to achieve responsive design, ensuring that the offset is correct regardless of screen size.
nav {
position: fixed;
}
.navigation-links-no-style a {
text-decoration: none;
position: relative;
margin: 15px;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
}
li {
float: left;
}
.navigation-links li {
padding-top: 1.3em;
}
.navbar {
overflow: hidden;
position: fixed;
top: 0;
width: 100%;
border-bottom: solid 1px black;
background: white;
padding-left: 5em;
}
.navbar a {
float: left;
display: block;
text-align: center;
padding: 14px 16px;
text-decoration: none;
margin-left: 20px;
color: black;
font-size: 14pt;
}
.order {
color: #FFFFFF !important;
background: #1419e2;
text-decoration: none;
padding: 8px;
border-radius: 5px;
margin-top: 15px;
float: right;
}
.order-container {
float: right;
margin-right: 10em;
}
<div class="navbar">
<a class="glacier-hills" href="glacier_hills.html">
<img src="Images/Glacier-Hills-Logo.svg" alt="" width="182" height="90">
</a>
<ul class="navigation-links">
<div class="navigation-links-no-style">
<li>
<a class="menu" href="menu.html">Menu</a>
</li>
<li>
<a class="location" href="location.html">Hours and Location</a>
</li>
</div>
<li class="order-container">
<a class="order" href="order.html">Order</a>
</li>
</ul>
</div>
MDN still advises that <div> is not a valid child of <ul>. Furthermore float adds a whole heap of side effects by removing the items from the natural flow of the document. To modernize this we can make use of display:flex
/*Normalise body*/
body {
margin:0;
}
/*Set flex on the nabar top position logo and links*/
.navbar {
display: flex;
}
/*Ad a maring to the logo link*/
.navbar > a:first-of-type {
margin-left: 5em;
}
nav {
position: fixed;
}
.navigation-links-no-style a {
text-decoration: none;
}
.navbar ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
width: 100%;
/*Ad flex to the nav link element*/
display: flex;
/*Vertically center the links*/
align-items:center;
}
/*Push the last element right but give it a little margin to the right*/
.navbar ul>li:last-of-type {
margin-left: auto;
margin-right:1em;
}
.navigation-links li {
padding-top: 1.3em;
}
.navbar {
overflow: hidden;
position: fixed;
top: 0;
width: 100%;
border-bottom: solid 1px black;
background: white;
}
.navbar a {
display: block;
text-align: center;
padding: 14px 16px;
text-decoration: none;
margin-left: 20px;
color: black;
font-size: 14pt;
}
.order {
color: #FFFFFF !important;
background: #1419e2;
text-decoration: none;
padding: 8px;
border-radius: 5px;
margin-top: 15px;
}
<div class="navbar">
<a class="glacier-hills" href="glacier_hills.html">
<img src="Images/Glacier-Hills-Logo.svg" alt="" width="182" height="90">
</a>
<ul class="navigation-links">
<li>
<a class="menu" href="menu.html">Menu</a>
</li>
<li>
<a class="location" href="location.html">Hours and Location</a>
</li>
<li>
<a class="order" href="order.html">Order</a>
</li>
</ul>
</div>
You should use media queries for making navbar responsive.
a {
text-decoration: none;
color: black;
}
.navbar {
width: 100%;
overflow: hidden;
position: fixed;
top: 0;
display: flex;
justify-content: space-between;
border-bottom: solid 1px black;
}
.div-links {
display: flex;
align-items: center;
width: 70%;
}
.nav-links {
width: 100%;
display: flex;
justify-content: end;
align-items: center;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
}
.nav-links li {
padding: 2rem;
}
.nav-items {
width: 30%;
display: flex;
justify-content: space-around;
}
.order {
overflow: hidden;
color: #ffffff !important;
background: #1419e2;
text-decoration: none;
padding: 0.8rem;
border-radius: 5px;
}
<div class="navbar">
<a href="glacier_hills.html">
<img
src="Images/Glacier-Hills-Logo.svg"
alt=""
width="182"
height="90"
/>
</a>
<div class="div-links">
<ul class="nav-links">
<div class="nav-items">
<li>
<a class="menu" href="menu.html">Menu</a>
</li>
<li>
<a class="location" href="location.html">Hours and Location</a>
</li>
</div>
<li class="btn">
<a class="order" href="order.html">Order</a>
</li>
</ul>
</div>
</div>
I have navbar menus with submenu dropped-down. whenever the menu is clicked then the submenus is expanded however when the submenu is clicked then the sub-menus returns collapsed. How to make the menu and its submenus stay expanded until the other menu is clicked?
above picture, when picture submenu under profile menu is clicked it opens a page and the profile menu stays expanded, until other menu (eg. messages menu) is clicked then profile menu is collapsed.
my fiddle
Please advise.
In your code, you are binding to a css :target that is RESET when any other link is clicked.
Whether this problem is solved, I do not know. But such tasks are usually done using javaScript
const links = document.querySelectorAll('.menu-btn');
let activeNav = null;
links.forEach(item => {
item.addEventListener('click', e => {
e.preventDefault();
const wrapper = item.closest('.item');
if (!wrapper) {
return;
}
/** 1. START - each menu item is separate*/
// wrapper.classList.toggle('open');
/** 1. END - each menu item is separate*/
/** 2. START - only one active (need variable - activeNav) */
if (activeNav === wrapper) {
/** If you want the active to be always, remove this code */
wrapper.classList.remove('open')
activeNav = null;
} else {
if (activeNav) {
activeNav.classList.remove('open');
}
wrapper.classList.add('open');
activeNav = wrapper;
}
/** 2. START - only one active */
})
})
#import url('https://fonts.googleapis.com/css2?family=Poppins:wght#100;200;300;400;500;600;700;800;900&display=swap');
* {
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body {
width: 100%;
background: #e5e7eb;
position: relative;
}
.wrapper .header {
z-index: 1;
background: #22242A;
position: fixed;
/*aslinya width: calc(100%-0%)*/
width: calc(100%);
height: 70px;
display: flex;
top: 0;
}
.wrapper .header .header-menu {
width: calc(100%-0%);
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
}
.wrapper .header .header-menu .title {
color: #fff;
font-size: 25px;
text-transform: uppercase;
font-weight: 900;
}
.wrapper .header .header-menu .title span {
color: #4ccee8;
}
.wrapper .header .header-menu .sidebar-btn {
color: #fff;
position: absolute;
margin-left: 240px;
font-size: 22px;
font-weight: 900;
cursor: pointer;
transition: 0.3s;
transition-property: color;
}
.wrapper .header .header-menu .sidebar-btn:hover {
color: #4ccee8;
}
.wrapper .header .header-menu ul {
display: flex;
}
/*tombol sebelah my panel*/
.wrapper .header .header-menu ul li a {
background: #fff;
color: #000;
display: block;
margin: 0 10px;
font-size: 18px;
width: 34px;
height: 34px;
line-height: 35px;
text-align: center;
border-radius: 50%;
transition: 0.3s;
transition-property: background, color;
}
.wrapper .header .header-menu ul li a:hover {
background: #4ccee8;
color: #fff;
}
.wrapper .sidebar {
z-index: 1;
background: #2f323a;
position: fixed;
top: 70px;
width: 250px;
/*begron abu2. aslinya: height: calc(100%-9%);*/
height: calc(100%);
transition: 0.3s;
transition-property: width;
overflow-y: auto;
}
.wrapper .sidebar .sidebar-menu {
overflow: hidden;
}
.wrapper .sidebar .sidebar-menu .profile img {
margin: 20px 0;
width: 100px;
height: 100px;
border-radius: 50%;
}
.wrapper .sidebar .sidebar-menu .profile p {
color: #bbb;
font-weight: 700;
margin-bottom: 10px;
}
.wrapper .sidebar .sidebar-menu .item {
width: 250px;
overflow: hidden;
}
.wrapper .sidebar .sidebar-menu .item .menu-btn {
display: block;
color: #fff;
position: relative;
padding: 25px 20px;
transition: 0.3s;
transition-property: color;
}
.wrapper .sidebar .sidebar-menu .item .menu-btn:hover {
color: #4ccee8;
}
.wrapper .sidebar .sidebar-menu .item .menu-btn i {
margin-right: 20px;
}
.wrapper .sidebar .sidebar-menu .item .menu-btn .drop-down {
float: right;
font-size: 12px;
margin-top: 3px;
}
.wrapper .sidebar .sidebar-menu .item .sub-menu {
background: #3498d8;
overflow: hidden;
max-height: 0;
transition: 0.3s;
transition-property: background, max-height;
}
.wrapper .sidebar .sidebar-menu .item .sub-menu a {
display: block;
position: relative;
color: #fff;
white-space: nowrap;
font-size: 15px;
padding: 20px;
border-bottom: 1px solid #8fc5e9;
transition: 0.3s;
transition-property: background;
}
.wrapper .sidebar .sidebar-menu .item .sub-menu a:hover {
background: #55b1f0;
}
.wrapper .sidebar .sidebar-menu .item .sub-menu i {
padding: right 20px;
font-size: 10px;
}
.wrapper .sidebar .sidebar-menu .item.open .sub-menu {
max-height: 500px;
}
.wrapper .sidebar .sidebar-menu .item:target .sub-menu {
/* max-height: 500px; */
}
.wrapper .main-container {
width: (100%-250px);
margin-top: 70px;
margin-left: 250px;
padding: 15px;
background: url("images/background.jpg")no-repeat;
height: 100vh;
transition: 0.3s;
}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Apanel</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<div class="header">
<div class="header-menu">
<div class="title">This <span>is</span></div>
<div class="sidebar-btn">
<i class="fas fa-bars"></i>
</div>
<ul>
<li><i class="fas fa-search"></i></li>
<li><i class="fas fa-bell"></i></li>
<li><i class="fas fa-power-off"></i></li>
</ul>
</div>
</div>
<div class="sidebar">
<div class="sidebar-menu">
<li class="item">
<a href="#" class="menu-btn">
<i class="fas fa-desktop"></i><span>Dashboard</span>
</a>
</li>
<li class="item" id="profile">
<a href="#profile" class="menu-btn">
<i class="fa fa-user-circle"></i><span>Profile <i class="fas fa-chevron-down drop-down"></i>
</span>
</a>
<div class="sub-menu">
<i class="fas fa-image"></i><span>Picture</span>
<i class="fas fa-address-card"></i><span>Info</span>
</div>
</li>
<li class="item" id="messages">
<a href="#messages" class="menu-btn">
<i class="fa fa-envelope"></i><span> Messages<i class="fas fa-chevron-down drop-down"></i>
</span>
</a>
<div class="sub-menu">
<i class="fas fa-envelope"></i><span>New</span>
<i class="fas fa-envelope-square"></i><span>Sent</span>
<i class="fas fa-exclamation-circle"></i><span>Spam</span>
</div>
</li>
<li class="item" id="settings">
<a href="#settings" class="menu-btn">
<i class="fa fa-cog"></i><span>Settings<i class="fas fa-chevron-down drop-down"></i>
</span>
</a>
<div class="sub-menu">
<i class="fas fa-lock"></i><span>Password</span>
<i class="fas fa-language"></i><span>Language</span>
<i class="fas fa-exclamation-circle"></i><span>Spam</span>
</div>
</li>
<li class="item">
<a href="#" class="menu-btn">
<i class="fas fa-info-circle"></i><span>About</span>
</a>
</li>
</div>
</div>
<div class="main-container">
link
</div>
</div>
</body>
</html>
I can't seem to find a great way of sizing my logo to fit within the header, I am trying to get a result with the logo on the left side of the header and the naviagtion on the right side. I've tried this and it seems to work but I don't know if there's a better way to approach this. If anyone could give some tips it would be greatly appreciated.
My CSS and HTML
a {
text-align: center;
color: #232323;
text-decoration: none;
transition: .1s;
}
button {
border: none;
outline: none;
color: #f3f3f3;
cursor: pointer;
transition: .3s;
}
header {
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
top: 0;
padding: 1em 2em;
max-height: 20%;
width: 100%;
z-index: 2;
background-color: #ffffff;
}
.logo-wrapper {
display: inline-block;
overflow: hidden;
}
.logo-wrapper img {
height: auto;
width: auto;
max-width: 150px;
}
nav {
display: inline-block;
}
.nav-item {
display: inline-block;
margin: 0 1.5em;
}
.get-started {
background-color: #f27649;
padding: 1em 2em;
border-radius: 3em;
}
.get-started:hover {
filter: brightness(85%);
}
<header>
<div class="logo-wrapper">
<a href="/">
<img src="images/devchat.png" alt="DevTalk Logo">
</a>
</div>
<nav>
<ul>
<li class="nav-item">Learning</li>
<li class="nav-item">About</li>
<li class="nav-item">Blog</li>
<li class="nav-item">Explore</li>
<li class="nav-item">Contact</li>
<li class="nav-item">Login</li>
<li class="nav-item"><button class="get-started" href="#">Get Started <i class="fas fa-angle-right"></i></button></li>
</ul>
</nav>
</header>
.Main {
width: 100%;
height: 100%;
}
// css to show the navigation bar top and the image of westminister
h1 {
text-align: center;
font: italic bold 50px Georgia, serif;
}
#navbar ul {
margin: 0;
padding-left: 0;
padding-right: 0;
overflow: hidden;
background-color: black;
font-size: 15px;
width: 100%;
}
#navbar li {
float: left;
list-style-type: none;
}
li a {
display: inline;
color: #d9d9d9;
padding: 25px 20px;
text-decoration: none;
list-style-type: none;
}
.topnavbar {
text-align: right;
font: size 19px;
padding: 18px 20px;
margin-right: 10px;
float: right;
}
#searchbar {
text-align: right;
text-decoration-color: #ffffff;
font: size 15px;
padding: 10px;
padding-right: 20px;
margin-top: 18px;
margin-right: 20px;
float: right;
background: #2f3640;
transform: translate3d(-50%, 50%);
border-radius: 40px;
outline: none;
transition: 0.4s;
width: 150px;
}
.search-btn {
text-decoration: none;
}
#btn {
margin-top: 30px;
color: white;
display: flex;
}
li a:hover:not(.active) {
opacity: 1;
color: #ffffff;
}
.active {
text-decoration: none;
color: #4da6ff;
outline: none;
}
I'm trying to make this web application using AngularJS and I am fairly new to it. I am making a navigation bar for a page to start with and I think I have done the normal bar properly. However I want to also add a search bar (haven't done the functioning yet since I have no idea how to) which will appeal when the mouse hovers over the <a> tag . I'm referring to a video which will be linked below. The difference is he is not using a navigation bar instead doing it in the middle of the video
The css and html is shown below.
The video I am referring to is this: https://www.youtube.com/watch?v=v1PeTDrw6OY
PS: what I want to do is include the icon inside the gray padding area so I can set the padding to zero and it would have the icon inside the padding alone and on hover I could expand the search bar field and let the user type. Any input regarding this is highly appreciated. Thank you
You need to have a common parent element to make it easier on yourself. With your HTML the most straightforward way would be to include the <a> into the <li>, instead of having it after. So turn this
<li><input type="text" id="searchbar" placeholder="Search Here"> </li>
<a class="search-btn" href="#"> <i id="btn" class="fas fa-search"></i> </a>
Into this:
<li>
<input type="text" id="searchbar" placeholder="Search Here">
<a class="search-btn" href="#"> <i id="btn" class="fa fa-search"></i> </a>
</li>
Then you can use position: absolute and easily place the icon where you want by adding this CSS:
li {
position: relative;
}
li input + a {
position: absolute;
top: 4px; /* change this */
left: 5px; /* change this */
}
using search-bar class, you can get what you want
.Main {
width: 100%;
height: 100%;
}
// css to show the navigation bar top and the image of westminister
h1 {
text-align: center;
font: italic bold 50px Georgia, serif;
}
#navbar ul {
margin: 0;
padding-left: 0;
padding-right: 0;
overflow: hidden;
background-color: black;
font-size: 15px;
width: 100%;
}
#navbar li {
float: left;
list-style-type: none;
}
li a {
display: inline;
color: #d9d9d9;
padding: 25px 20px;
text-decoration: none;
list-style-type: none;
}
.topnavbar {
text-align: right;
font: size 19px;
padding: 18px 20px;
margin-right: 10px;
float: right;
}
#searchbar {
text-align: left;
text-decoration-color: #ffffff;
font: size 15px;
padding: 10px;
padding-right: 20px;
float: right;
background: #2f3640;
transform: translate3d(-50%, 50%);
border-radius: 40px;
outline: none;
transition: 0.4s;
width: 150px;
}
.search-btn {
text-decoration: none;
background: transparent;
outline: 0;
border: 0;
color: #fff;
position: absolute;
right: 10px;
top: 38px;
bottom: 0;
margin: auto 0;
line-height: 100%;
display: inline-block;
line-height: 100%;
display: block;
height: 22px;
}
li a:hover:not(.active) {
opacity: 1;
color: #ffffff;
}
.active {
text-decoration: none;
color: #4da6ff;
outline: none;
}
.search-bar{
position: relative;
}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<div class="Main">
<div id="navbar">
<ul>
<li><img src="assets/img/xyz.png" alt="logo" width="180px" height="80px" style="float:left"></li>
<li> <a class="topnavbar active" [routerLink]="['page6']">Display Items </a> </li>
<li> <a class="topnavbar" [routerLink]="['page2']">Add Items </a> </li>
<li> <a class="topnavbar" [routerLink]="['page3']"> Delete Items </a> </li>
<li> <a class="topnavbar" [routerLink]="['page4']">Borrow Items </a> </li>
<li> <a class="topnavbar" [routerLink]="['page5']">Return Items</a> </li>
<li> <a class="topnavbar" [routerLink]="['page6']">Generate Report </a> </li>
<li> <a class="topnavbar" [routerLink]="['page6']">Generate Report </a> </li>
<li>
<div class="search-bar">
<input type="text" id="searchbar" placeholder="Search Here">
<button class="search-btn"><i id="btn" class="fas fa-search"></i></button>
</div>
</li>
</ul>
</div>
</div>
When I zoom in my page, all the elements go to left side, they are not collapsed but i want the web page to be on center when I zoom. I have made a container class and added a margin:auto to it bu it does not change anymore. Hope somebody answer it exactly.
#font-face {
font-family: irsans;
src:url('../fonts/irsans.woff2');
}
body{
margin:0;
}
.container{
margin:0 auto;
max-width:100%; /* requierd width */
background:red;
}
header {
width: 100%;
margin: auto;
height: 150px;
background-color: #FCFCFC;
}
.topnav{
position: absolute;
left: 334px;
top: 2px;
width: 552px;
height: 18px;
display: inline-block;
}
.topnav_items a{
margin: 2px;
font-size: 11px;
font-family: irsans;
color: #333;
float: left;
list-style: none;
padding: 0 5px;
}
.topnav_items li a:hover, .topnav_items li a:active {
text-decoration: none;
color: #8B9498;
}
<div class="container">
<header>
<div class="topnav">
<ul class="topnav_items">
<li class="fa fa-envelope-o" style="font-size:11px;">ارتباط با برنامه</li>
<li class="fa fa-bar-chart" style="font-size:11px;">پیش بینی مسابقات</li>
<li class="fa fa-desktop" style="font-size:11px;">تبلیغات</li>
<li class="fa fa-download" style="font-size:11px;">نرم افزار مسابقات پیامکی 90</li>
</ul>
</div>
</header>
</div>
Put your container(better call it wrapper) insidw the header.
Give the Container a fixed with using the with of ur topnav.
put margin to margin: 0 auto;
tkae out all atribute related to position: absolut from ur topnav.
(If ur not happ with the result u can also try to give container a relative with. For example with: 50% margin: 0 25%;)
<header>
<div class="container">
<div class="topnav">
<ul class="topnav_items">
<li class="fa fa-envelope-o" style="font-size:11px;">ارتباط با برنامه</li>
<li class="fa fa-bar-chart" style="font-size:11px;">پیش بینی مسابقات</li>
<li class="fa fa-desktop" style="font-size:11px;">تبلیغات</li>
<li class="fa fa-download" style="font-size:11px;">نرم افزار مسابقات پیامکی 90</li>
</ul>
</div>
</div>
</header>
#font-face {
font-family: irsans;
src:url('../fonts/irsans.woff2');
}
body{
margin:0;
}
.container {
margin: 0 25%;
max-width: 552px;
}
header {
width: 100%;
margin: auto;
height: 150px;
background-color: #FCFCFC;
}
.topnav {
width: 100%;
height: 18px;
display: inline-block;
}
.topnav_items a{
margin: 2px;
font-size: 11px;
font-family: irsans;
color: #333;
float: left;
list-style: none;
padding: 0 5px;
}
.topnav_items li a:hover, .topnav_items li a:active {
text-decoration: none;
color: #8B9498;
}