Logo and social media icons stuck behind header [closed] - html

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have completed three pages to my website with clean code(checked) however, the most important page, page one is putting through the ringer because I can't seem to get my logo to stay in the left-hand corner(fixed) and appear in front of my header and my social media icons to appear in front of my header and appear in right-hand corner. My first is the only page where the code is kind of wacky. This is my first site. I have tried using z-index as well as float and display: hidden. Now I am just stuck.HELP! PLEASE! I am just about researched out on this one. z-index sends my header to the back logo to the front. I am so close to finishing. I have been stuck on this for 4 weeks.
html,
body{
margin:0px;
padding: 0px;
padding-bottom:25px;
background:url(https://images.unsplash.com/41/NmnKzKIyQsyGIkFjiNsb_20140717_212636-3.jpg?q=80&fm=jpg&s=ce9ba69c9caf7d6483d874466478bc9b) no-repeat
center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
color:#ffffff;
}
#wrapper {
background: #107CBD;
min-height:%;
position:relative;
width:960px;
margin:0 auto;
margin-bottom:-60px; /* Negitive Height of Footer */
}
#header {
width: 100%;
background:#107CBD;
padding:19px;
position:absolute;
left:0;
top:0;
background-color: #107CBD;
}
#header h1{
font-family:Noto sans, sans serif;
font-weight: 200;
color: white;
font-size: 2em;
margin-right: %;
}
#header h2{
font-family:Courgette,cursive;
font-weight: 100;
color: white;
font-size: 2em;
margin-right:%;
}
h1+h2{margin-top:-20px;
}
#body {
padding: 10px;
padding-bottom:60px; /* Height of Footer and some change */
background:#FFF; /* Wrapper BG COLOR */
}
#logo{
text-indent: -999999{
z-index:1;
}
#social-media-icons{float:right;}
#social-media-icons ul li{display:inline;}
#social-media-icon ul li{padding-top: 10px;}
}
#social{
float: right;
}
#socail ul{
margin-top-right: 10px;
#socail li{
dispaly.inline;
}
.social-sidebar-buttons{
width: 15px;
margin-left: 15px;
}
.wrapper{
width:960px;
}
.icon{
float:left;
}
.text{
float:left;
padding-left:25px;
padding-top:40px;
font-family: Noto sans,sans serif;
}
.software ul {
position: relative;
width:80%;
padding:1em 1.5em;
margin: 2em auto;
color:#fff;
background:#107CBD;
overflow: hidden;
font-family:'Noto Sans', sans-serif;
}
.software ul:before{
content: "";
position: absolute;
top:0;
right: 0;
border-width: 0 16px 16px 0;
border-style: solid;
border-color: #fff #fff #107CBD #107CBD;
background: #107CBD;
-web-kit-box-shadow: 0 1px 1px rgba(0,0,0,0.3), -1px 1px 1px rgba(0,0,0.2);
-moz-box-shadow: 0 1px 1px rgba(0,0,0,0.3), -1px 1px 1px rgba(0,0,0.0.2);
/* Firefox 3.0 damage limitation*/
display: block; width: 0;
box-shadow: 0 1px 1px rgba(0,0,0,0.3),1px 1px 1px rgba(0,0,0,0.2);
display: block width 0px;
}
.software ul.rounded{
-moz-border-radius: 5px 0 5px 5px;
border-radius: 5px 0 5px 5px;
}
.software ul.rounded:before{
border-width:8px;
border-color: #fff #fff transparent transparent;
-moz-border-radius: 0 0 0 5px;
border-radius: 0 0 0 5px;
}
.social{
float:right;
margin-right:200px;
margin-top:20px;
}
font-family:'Noto Sans';
}
.content{
width: 1000%;
margin: 0 auto;
}
#import url(http://fonts.googleapis.com/css?family=Raleway);
#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a,
#cssmenu #menu-button {
margin: 0;
padding: 0;
border: 0;
list-style: none;
line-height: 1;
display: block;
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#cssmenu:after,
#cssmenu > ul:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
#cssmenu #menu-button {
display: none;
}
#cssmenu {
width: auto;
font-family: Raleway, sans-serif;
line-height: 1;
}
#cssmenu > ul {
background: #505050;
}
#cssmenu > ul > li {
float:left;
-webkit-perspective: 1000px;
-moz-perspective: 1000px;
perspective: 1000px;
left: 36%
}
#cssmenu.align-center > ul {
font-size: 0;
text-align: center;
}
#cssmenu.align-center > ul > li {
display: inline-block;
float: none;
}
#cssmenu.align-right > ul > li {
float: right;
}
#cssmenu > ul > li > a {
padding: 16px 20px;
font-size: 14px;
color: #ffffff;
letter-spacing: 1px;
text-transform: uppercase;
text-decoration: none;
background: #505050;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
-webkit-transform-origin: 50% 0;
-moz-transform-origin: 50% 0;
transform-origin: 50% 0;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
#cssmenu > ul > li.active > a {
color: #107CBD;
}
#cssmenu > ul > li:hover > a,
#cssmenu > ul > li > a:hover {
color: #107cbd;
-webkit-transform: rotateX(90deg) translateY(-23px);
-moz-transform: rotateX(90deg) translateY(-23px);
transform: rotateX(90deg) translateY(-23px);
-ms-transform: none;
}
#cssmenu > ul > li > a::before {
position: absolute;
top: 100%;
left: 0;
z-index: -1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 16px 20px;
color: #107cbd;
background: #1d1d1d;
content: attr(data-title);
-webkit-transition: background 0.3s;
-moz-transition: background 0.3s;
transition: background 0.3s;
-webkit-transform: rotateX(-90deg);
-moz-transform: rotateX(-90deg);
transform: rotateX(-90deg);
-webkit-transform-origin: 50% 0;
-moz-transform-origin: 50% 0;
transform-origin: 50% 0;
-ms-transform: translateY(- -18px);
}
#cssmenu > ul > li:hover > a::before,
#cssmenu > ul > li > a:hover::before {
background: #505050;
}
#cssmenu.small-screen {
width: 100%;
}
#cssmenu.small-screen > ul,
#cssmenu.small-screen.align-center > ul {
width: 100%;
text-align: left;
}
#cssmenu.small-screen > ul > li,
#cssmenu.small-screen.align-center {
float: none;
display: block;
border-top: 1px solid rgba(100, 100, 100, 0.1);
}
#cssmenu.small-screen > ul > li:hover > a,
#cssmenu.small-screen > ul > li > a:hover {
color: #107cbd;
-webkit-transform: none;
-moz-transform: none;
transform: none;
-ms-transform: none;
}
#cssmenu.small-screen > ul > li > a::before {
display: none;
}
#cssmenu.small-screen #menu-button {
display: block;
padding: 16px 20px;
cursor: pointer;
font-size: 14px;
text-decoration: none;
color: #ffffff;
text-transform: uppercase;
letter-spacing: 1px;
background: #505050;
}
#cssmenu.small-screen #menu-button:after {
content: "";
position: absolute;
right: 20px;
top: 17px;
display: block;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border-top: 2px solid #ffffff;
border-bottom: 2px solid #ffffff;
width: 22px;
height: 3px;
}
#cssmenu.small-screen #menu-button.menu-opened:after {
border-top: 2px solid #107cbd;
border-bottom: 2px solid #107cbd;
}
#cssmenu.small-screen #menu-button:before {
content: "";
position: absolute;
right: 20px;
top: 27px;
display: block;
width: 22px;
height: 2px;
background: #ffffff;
}
#cssmenu.small-screen #menu-button.menu-opened:before {
background: #107cbd;
}
div nav ul li{
text-align: left;
display: inline;
width: %;
float:left;
margin-right: .8em;
font-family: 'Noto Sans';
}
li.changeBackground {
background-color: #505050;
}
li.changeBackground:hover {
background-color: #777777;
}
li.changeBackground:active {
background-color: #107CBD;
}
.homepage-hero-module {
border-right: none;
border-left: none;
position: relative;
}
p{
position:relative;
width: 30%;
padding:1em 1.5em;
margin:2em auto;
color: #fff;
background:#107CBD;
overflow: hidden;
font-family:'Noto Sans';
}
p:before{
content: "";
position: absolute;
top: 0;
right: 0;
border-width: 0 16px 16px 0;
border-style: solid;
border-color: #fff #fff #505050 #505050;
background: #505050;
-web-kit-box-shadow: 0 1px 1px rgba(0,0,0,0.3), -1px; rgba(0,0,0.2);
-moz-box-shadow: 0 1px 1px rgba(0,0,0,0.3), -1px 1px 1px;rgba(0,0,0.2);
box-shadow:0 1px 1px rgba(0,0,0,0,0.3), -1px 1px 1px rgba(0,0,0 0.2);
/* Firefox 3.0 damage limitation*/
display: block; width: 0;
}
p.rounded{
-moz-border-radius: 5px 0 5px 5px;
border-radius: 5px 0 5px 5px;
}
.p.rounded:before{
border-width: 9px;
border-color: #fff #fff transparent transparent;
-moz-border-radius: 0 0 0 5px;
border-radius: 0 0 0 5px;
}
h3{
font-family:'Noto-Sans', sans-serif;
}
#footer{
position: fixed;
bottom:0px;
}
#footer{
margin: 1px;
height:100px;
width: 100%;
border-top: 3px solid #107CBD;
clear: both;
color: #fff;
line-height:20px;
background-color: #505050;
text-align:center;
position:fixed;
font-size:12px;
bottom:0px;
}
#footer ul li a{
text-decoration: none;
font-family: Noto-sans,sans serif;
padding:2em 1em;
color: #fff;
}
#footer ul li a: hover{
color: #000;
background-color:#777777;
}
!DOCTYPE html>
<html lang= "en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="path to icon/favicon.ico"/>
<link href='https://fonts.googleapis.com/css?family=Noto+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Courgette' rel='stylesheet' type='text/css'>
<title>Dawn's website</title>
</head><
<div id="wrapper">
<header id="logo">
<ahref="index.html"<img src="images/onebugforwebdt.jpg"
alt= "One Bug Design" width="60" height="64">
</header>
</div>
<div class="social">
<ul>
<li><img src="images/Twitter-2-icon.png"></li>
<li><img src="images/Linkedin-icon.png"></li>
<li><img src="images/pinterest-icon.png"></li>
</ul>
</div>
<body id="home"
<div id="wrapper">
<header id="logo">
<h1 class="logo">one bug logo</h1>
<div id="header">
<h1 align="center">One Bug Design</h1><h2 align="center">Designed To Create</h2>
<h1 class="closer"></h1>
<h2 class="closer"></h2>
</div>
</div>
<div id='cssmenu'>
<ul>
<li class='active'><a href='index.html'>Home</a></li>
<li><a href='#'>Portfolio</a></li>
<li><a href='#'>Finds</a></li>
<li><a href='Contact.html'>Contact</a></li>
</ul>
</div>
<div id="content"
</div>
</nav>
<main class="content">
<div class="wrap">
</div>
</div>
<p>
Dawn here, your friendly graphic designer. Do you need someone to make your brand sparkle with desire? Someone to show your logo some love. Do you need someone who truly enjoys the overall creative process and has an eye for great design? Someone who is fluent in the ways of the Adobe CC Master. Someone who will listen and fulfill your visual communication needs. Someone who is determined and who has Ideation? Well click no further! You have arrived at your destination. ........<strong>Welcome!</strong></p>
<section>
<h3>Software skills</h3>
<div class="wrapper">
<div class="icon"><img alt="Illustrator icon" src=
"images/Adobe-Ai-icon.png" width="50px">
<img alt="Indesign icon" src="images/Adobe-Id-icon.png" width="50px">
<img alt="Photoshop icon" src="images/Adobe-PS-icon.png" width="50px">
<img alt="Bridge icon" src="images/bridge-icon.png" width="50px">
<img alt="Camera icon" src="images/Camera-Nikon-Coolpix-L820-02-icon.png" width="50px">
<img alt="HTML icon" src="images/HTML-5-icon.png" width="50px">
<img alt="CSS icon" src="images/css-icon.png" width="50px">
<img alt="Microsoft Office" src="images/Office-icon.png" width="50px"></div>
<div class="text">
Illustrator |
Indesign |
Photoshop |
Bridge |
DSLR|
HTML5 |
CSS |
Microsoft Office |
</div>
</div>
</section>
<div id="social">
<ul>
<li><img src="images/Twitter-2-icon.png"></li>
<li><img src="images/Linkedin-icon.png"></li>
<li><img src="images/pinterest-icon.png"></li>
</ul>
</div>
<div id="footer">
<div id="nav">
<nav class="sitemenu">
<div class="navwrapper">
<ul>
<li class="changeBackground">Home</li>
<li class="changeBackground">Portfolio</li>
<li class="changeBackground">Finds</li>
<li class="changeBackground">Contact</li>
<li>©2015-2016 One Bug Design All Rights Reserved</li>
</ul>
</div>
</nav>
</ul>
<br>
<p class="footer-text">
<div class="social">
<h3 align="right">Stay connected</h3>
<a class= "social twitter" ahref="https://twitter.com/fraggleart">img src="images/Twitter-2-icon.png"</a>
<a class="social pinterest" ahref="https://pinterest.com/rasberry14">img src="images/Pinterest-icon.png"</a>
<a class="social linkedin"ahref="https://linkedin.com/in/dawncthomas">img src="images/Linkedin-icon.png"</a>
</div> </div>
</footer>
</body>
</html>

Add these properties to social class like this.
.social {
float: right;
position: relative;
z-index: 9999;
}

a very HORRIBLE ERROR that you are committing is declaring .wrapper div
</head><
<div id="wrapper">
outside the body tag right after where the <head> tag ends. which shows a very poorly formatted HTML5 markup. I have written a sematically correct html5 markup for you to act as guide along with some css style that shows logo to the left and social links (in my case its just list items, you should change them with image links properly) to the right and also in front of header (the problem you are facing).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<!-- <link rel="stylesheet" href="stackof.css">-->
</head>
<body>
<style>
html, body {
margin: 0;
padding: 0;
border: 0;
}
body {
background:url(https://images.unsplash.com/41/NmnKzKIyQsyGIkFjiNsb_20140717_212636-3.jpg?q=80&fm=jpg&s=ce9ba69c9caf7d6483d874466478bc9b) no-repeat
center center fixed;
}
.wrapper {
max-height: 100%;
}
header {
max-width: 100%;
}
header .left-col {
max-width: 35%;
float: left;
margin-left: 5%;
margin-top: 5%;
}
.right-col {
width: 70%;
float: right;
}
.right-col ul {
width: 100%;
}
.right-col ul li {
list-style: none;
float: left;
display: block;
padding-top: 5%;
margin-left: 5%;
}
.right-col li a {
text-decoration: none;
color: aliceblue;
}
</style>
<div id="wrapper">
<header id="logo">
<div class="left-col">
<a href="#">
<img src="pro/images/logo.png" alt="">
</a>
</div>
<div class="right-col social-links">
<ul>
<li>Lorem.</li>
<li>Minus.</li>
<li>Nulla.</li>
<li>Cum.</li>
<li>Ratione!</li>
</ul>
</div>
</header>
<main>
<!--write your sections here-->
<section class="setion-1"></section>
<section class="section-2"></section>
<aside></aside>
</main>
<footer>
<!--your footer goes here-->
</footer>
</div>
</body>
</html>
you should cut/paste the style data into any file you name with .css format i.e. stackof.css in my case to make it look more nice and un-comment the link tag.

Related

How to get the sidebar to the right side of the screen

I'm new to css, so don't mind my skills, I copied this code from somebody else online.
What I want to do is, having the sidebar to be at the right and when you hover over it, the details pop out towards the left. I'd appreciate any help that I get.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="sidebar">
<nav>
<ul>
<li>
<i class="fa fa-facebook-f"></i><span>Facebook</span>
</li>
<li>
<i class="fa fa-instagram"></i><span>Instagram</span>
</li>
</ul>
</nav>
</div>
</link>
#import url('https://fonts.googleapis.com/css?family=Montserrat:600&display=swap');
.sidebar *{
background-color: #333;
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
box-sizing: border-box;
}
.sidebar {
display: inline;
font-family: 'Montserrat', sans-serif;
height: 100vh;
}
.sidebar nav{
position: absolute;
width: 70px;
margin-top: 125px;
transition: all 0.3s linear;
box-shadow: 2px 2px 8px 0px rgba(0,0,0,.4);
}
.sidebar nav li{
height: 60px;
position:relative;
}
.sidebar nav li a{
color: white;
display: block;
height: 100%;
width: 100%;
line-height: 60px;
padding-left:25%;
border-bottom: 1px solid rgba(0,0,0,.4);
transition: all .3s linear;
}
.sidebar nav li a i{
position:absolute;
top: 17px;
left: 20px;
font-size: 27px;
}
ul li a span{
display: none;
font-weight: bold;
letter-spacing: 1px;
text-transform: uppercase;
}
.sidebar a:hover {
z-index:1;
width: 300px;
border-bottom: 1px solid rgba(0,0,0,.5);
box-shadow: 0 0 1px 1px rgba(0,0,0,.3);
}
.sidebar ul li:hover a span{
padding-left: 30%;
display: block;
}
tried setting text-center, align-items properties didnt work
So The first thing I did was to add float:inline-end; to our .Sidebar{} and removed position:fixed; from our nav selector.
(my own first instinct was to use flexbox, but that's just me.)
This will make your sidebar float on the right side of the screen and your nav is just housed in it.
Then to change the direction of our animation, we change padding-left:20% of .Sidebar ul li:hover a span{} to padding-right:20% and add float:inline-end to .Sidebar nav li a{}.
And that's pretty much it I think.
I didn't have to touch our html code so here's what I ended up with in the stylesheet:
#import url('https://fonts.googleapis.com/css?family=Montserrat:600&display=swap');
body {
background-color: black;
}
.sidebar *{
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
box-sizing: border-box;
}
.sidebar {
display:inline;
float: inline-end;
font-family: 'Montserrat', sans-serif;
height: 100vh;
}
.sidebar nav{
width: 70px;
margin-top: 150px;
transition: all 0.3s linear;
box-shadow: 2px 2px 8px 0px rgba(0,0,0,.4);
}
.sidebar nav li{
height: 60px;
position:relative;
}
.sidebar nav li a{
color: white;
display: block;
float: inline-end;
height: 100%;
width: 100%;
line-height: 60px;
border-bottom: 1px solid rgba(0,0,0,.4);
transition: all .3s linear;
}
.sidebar nav li a i{
position:absolute;
float: inline-end;
top: 17px;
left: 20px;
font-size: 27px;
}
ul li a span{
display: none;
font-weight: bold;
letter-spacing: 1px;
text-transform: uppercase;
}
.sidebar a:hover {
z-index:1;
width: 300px;
border-bottom: 1px solid rgba(0,0,0,.5);
box-shadow: 0 0 1px 1px rgba(0,0,0,.3);
}
.sidebar ul li:hover a span{
padding-right:20%;
display: block;
} ```
After a few minutes of "calculated" guessing I found a solution. You say it needs to be a relative position but you don't say where it needs to go. So I just typed coordinates here, if you want to update these coordinates you will have to watch out because it is very sensitive (The coordinates aren't correct because I worked in a smaller window).
I hope this helped you (if so pls let me know), have a nice day :-)
#import url('https://fonts.googleapis.com/css?family=Montserrat:600&display=swap');
.sidebar *{
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
box-sizing: border-box;
}
.sidebar {
display: inline;
font-family: 'Montserrat', sans-serif;
height: 100vh;
}
.sidebar nav{
position: fixed;
/*You say it needs to be a relative position but you don't say where it needs to go:*/
top: 10px; left: 400px;
width: 70px;
margin-top: 150px;
transition: all 0.3s linear;
box-shadow: 2px 2px 8px 0px rgba(0,0,0,.4);
}
.sidebar nav li{
height: 60px;
position:relative;
}
.sidebar nav li a{
color: white;
display: block;
height: 100%;
width: 100%;
line-height: 60px;
padding-left:25%;
border-bottom: 1px solid rgba(0,0,0,.4);
transition: all .3s linear;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<div class="sidebar">
<nav>
<ul>
<li>
<i class="fa fa-facebook-f"></i><span>Facebook</span>
</li>
<li>
<i class="fa fa-instagram"></i><span>Instagram</span>
</li>
</ul>
</nav>
</div>
</link>

How to restrict the row size of a CSS Grid?

I have a CSS Grid layout where the top row size increases on decreasing the view port size, which is not what I want.
I don't know what changes I have to make so that the top row size doesn't increase.
/* change border colour to suit your needs */
html{
background-color:azure;
}
.sideNav{
background: #eee;
text-decoration: none;
font-size: 1.25vw;
color:blueviolet;
margin:10px 5px 10px 0px;
margin-top: 200px;
position:absolute;
}
table{
background-color: #eee;
width:100%;
border-spacing:2px;
}
th{
background:azure;
padding:5px;
}
td{
border-bottom: 1px solid white;
padding:5px;
font-size=1vw;
}
/*specific selectors*/
th.No {
text-align:center;
}
td.No {
text-align:center;
}
.heading1{
font-family:sans-serif;
font-size:2vw;
text-align:center;
background-color:blue;
color:white;
border-radius:2px;
}
.heading2{
font-family:sans-serif;
font-size:20px;
text-align:left;
margin-top:10px;
color:black;
border-radius:5px;
}
body{
background-color:white;
}
.container{
display:grid;
grid-template-columns:repeat(6, 1fr);
grid-template-rows:repeat(8, 1fr);
grid-template-areas:
"top top top top top top "
"Lbar main main main main Rbar"
"Lbar main main main main Rbar"
"Lbar main main main main Rbar"
"Lbar main main main main Rbar"
"Lbar main main main main Rbar"
"Lbar main main main main Rbar"
"foot foot foot foot foot foot"
}
.title{
grid-area:top;
}
img{
width:100%;
}
.leftBar{
grid-area: Lbar;
}
ul{
text-decoration: none;
}
.rightBar{
grid-area: Rbar;
}
.contentArea{
grid-area: main;
}
.footerArea{
grid-area: foot;
border:5px;
padding:5px;
height:40%;
text-align:center;
background-color:cornflowerblue;
}
<!-- SlideShow Starts--!>
* {box-sizing:border-box}
/* Slideshow container */
.slideshow-container {
max-width: 1000px;
position: relative;
margin: auto;
}
/* Hide the images by default */
.mySlides {
display: none;
}
/* Next & previous buttons */
.prev, .next {
cursor: pointer;
position: absolute;
top: 50%;
width: auto;
margin-top: -22px;
padding: 16px;
color: black;
font-weight: bold;
font-size: 18px;
transition: 0.6s ease;
border-radius: 0 3px 3px 0;
}
/* Position the "next button" to the right */
.next {
right: 0;
border-radius: 3px 0 0 3px;
}
/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
background-color: ghostwhite;
}
/* Caption text */
.text {
color: #f2f2f2;
font-size: 15px;
padding: 8px 12px;
position: absolute;
bottom: 8px;
width: 100%;
text-align: center;
}
/* Number text (1/3 etc) */
.numbertext {
color: #f2f2f2;
font-size: 12px;
padding: 8px 12px;
position: absolute;
top: 0;
}
/* The dots/bullets/indicators */
.dot {
cursor: pointer;
height: 15px;
width: 15px;
margin: 0 2px;
background-color: #bbb;
border-radius: 50%;
display: inline-block;
transition: background-color 0.6s ease;
}
.active, .dot:hover {
background-color: #717171;
}
/* Fading animation */
.fade {
-webkit-animation-name: fade;
-webkit-animation-duration: 1.5s;
animation-name: fade;
animation-duration: 1.5s;
}
#-webkit-keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
#keyframes fade {
from {opacity: .4}
to {opacity: 1}
}
<!-- SlideShow Ends--!>
img .title{
position:fixed;
}
/* Left Menu*/
.navigation {
padding: 0;
margin: 0;
border: 0;
line-height: 1;
}
.navigation ul, .navigation ul li, .navigation ul ul {
list-style: none;
margin: 0;
padding: 0;
}
.navigation ul {
z-index: 500;
float: left;
}
.navigation ul li {
float: left;
min-height: 0.05em;
line-height: 1em;
vertical-align: middle;
position: relative;
}
.navigation ul li.hover,
.navigation ul li:hover {
position: relative;
z-index: 510;
cursor: default;
}
.navigation ul ul {
visibility: hidden;
position: absolute;
top: 100%;
left: 0px;
z-index: 520;
width: 100%;
}
.navigation ul ul li { float: none; }
.navigation ul ul ul {
top: 0;
right: 0;
}
.navigation ul li:hover > ul { visibility: visible; }
.navigation ul ul {
top: 0;
left: 99%;
}
.navigation ul li { float: none; }
.navigation ul ul { margin-top: 0.05em; }
.navigation {
width:100%;
background: #1568ef;
font-family: 'roboto', Tahoma, Arial, sans-serif;
zoom:1;
}
.navigation:before {
content: '';
display: block;
}
.navigation:after {
content: '';
display: table;
clear: both;
}
.navigation a {
display: block;
padding: 1em 1.3em;
color: #ffffff;
text-decoration: none;
text-transform: uppercase;
}
.navigation > ul { width:12em; }
.navigation ul ul { width: auto; }
.navigation > ul > li > a {
border-right: 0.3em solid #34A65F;
color: #ffffff;
}
.navigation > ul > li > a:hover { color: #ffffff; }
.navigation > ul > li a:hover, .navigation > ul > li:hover a { background: #34A65F; }
.navigation li { position: relative; }
.navigation ul li.has-sub > a:after {
content: '»';
position: absolute;
right: 1em;
}
.navigation ul ul li.first {
-webkit-border-radius: 0 3px 0 0;
-moz-border-radius: 0 3px 0 0;
border-radius: 0 3px 0 0;
}
.navigation ul ul li.last {
-webkit-border-radius: 0 0 3px 0;
-moz-border-radius: 0 0 3px 0;
border-radius: 0 0 3px 0;
border-bottom: 0;
}
.navigation ul ul {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
.navigation ul ul { border: 1px solid #34A65F; }
.navigation ul ul a { color: #ffffff; }
.navigation ul ul a:hover { color: #ffffff; }
.navigation ul ul li { border-bottom: 1px solid #0F8A5F; }
.navigation ul ul li:hover > a {
background: #4eb1ff;
color: #ffffff;
}
.navigation.align-right > ul > li > a {
border-left: 0.3em solid #34A65F;
border-right: none;
}
.navigation.align-right { float: right; }
.navigation.align-right li { text-align: right; }
.navigation.align-right ul li.has-sub > a:before {
content: '+';
position: absolute;
top: 50%;
left: 15px;
margin-top: -6px;
}
.navigation.align-right ul li.has-sub > a:after { content: none; }
.navigation.align-right ul ul {
visibility: hidden;
position: absolute;
top: 0;
left: -100%;
z-index: 598;
width: 100%;
}
.navigation.align-right ul ul li.first {
-webkit-border-radius: 3px 0 0 0;
-moz-border-radius: 3px 0 0 0;
border-radius: 3px 0 0 0;
}
.navigation.align-right ul ul li.last {
-webkit-border-radius: 0 0 0 3px;
-moz-border-radius: 0 0 0 3px;
border-radius: 0 0 0 3px;
}
.navigation.align-right ul ul {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
<!-- counter-->
.main_container {
height: 146px;
width: auto;
padding: 3px;
margin: 2px;
max-width: 300px;
background-color: #555555;
align-content: center;
}
.container_inner {
height: auto;
border: none;
background-color: #555555;
max-width: 290px;
vertical-align: center;
padding-top: 12px;
padding-left: 10px;
align-content: center;
}
.num_tiles {
width:30px;
height: 30px;
background-color: #888888;
color: #ffffff;
font-size: 22px;
text-align: center;
line-height: 20px;
padding: 3px;
margin: 1.5px;
font-family: verdana;
vertical-align: center;
}
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content= "width=device-width, initial-scale=1.0">"
<link rel="stylesheet" href="meu_css/meustyles.css">
</head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'GA_TRACKING_ID');
</script>
<body>
<div class= "container">
<div class="title"><img src="img_meu/Header%20PGIMS3.png"></div>
<div class="navigation">
<ul>
<li> Officials
<!--<ul>
<li class="has-sub"> Submenu 1.1
<ul>
<li>Submenu 1.1.1</li>
<li class="has-sub">Submenu 1.1.2
<ul>
<li>Submenu 1.1.2.1</li>
<li>Submenu 1.1.2.2</li>
</ul>
</li>
</ul>
</li>
<li>Submenu 1.2</li>
</ul> -->
</li>
<li class="has-sub"> Workshops
<ul>
<li>Faculty programmes</li>
<li>Postgraduate programmes</li>
<li>CME's/sensitization Programmes</li>
</ul>
</li>
<li> Contact Us
<!--<ul>
<li>Submenu 3.1</li>
<li>Submenu 3.2</li>
</ul> -->
</li>
</ul>
</div>
<div class="contentArea">
<div>
<div class="heading1">Medical Education Unit</div>
<!-- Slideshow container -->
<div class="slideshow-container">
<!-- Full-width images with number and caption text -->
<div class="mySlides fade">
<div class="numbertext">1 / 3</div>
<img src="img_meu/imgMeu1.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">2 / 3</div>
<img src="img_meu/imgMeu2.jpg" style="width:100%">
</div>
<div class="mySlides fade">
<div class="numbertext">3 / 3</div>
<img src="img_meu/imgMeu3.jpg" style="width:100%">
</div>
<!-- Next and previous buttons -->
<a class="prev" onclick="plusSlides(-1)">❮</a>
<a class="next" onclick="plusSlides(1)">❯</a>
</div>
<br>
<div><marquee style=" color:blue;font-family:sans-serif;font-size:1.25vw;background-color: #f9f6e3">This page is for information only and is under construction</marquee></div>
</div>
<script>
var slideIndex = 0;
showSlides();
function showSlides() {
var i;
var slides = document.getElementsByClassName("mySlides");
for (i = 0; i < slides.length; i++) {
slides[i].style.display = "none";
}
slideIndex++;
if (slideIndex > slides.length) {slideIndex = 1}
slides[slideIndex-1].style.display = "block";
setTimeout(showSlides, 5000); // Change image every 2 seconds
}
</script>
<div style="overflow-x:auto;">
<div >
<table id = "officials" >
<caption style="font-size:2vw;">Officials</caption>
<tr>
<th class="No">S.No</th>
<th>Name</th>
<th>Designation</th>
</tr>
</tr>
</table>
</div>
</div>
<div>
<table>
<caption style="font:2vw;">Workshops</caption>
<tr>
<th id="facDev">Faculty Development Programmes</th>
</tr>
<tr><td>Thesis writing & Research methodology by team of UCMS, New Delhi organized from 11th -13th August 2015 at Pt. B D Sharma Post Graduate Institute of Medical Sciences, UHS, Rohtak</td></tr>
<tr><td>1st Revised Basic Course Workshop in Medical Education Technologies organized under the aegis of MCI Regional Centre for Medical Education Technologies, Maulana Azad Medical College, New Delhi at Pt. B D Sharma Post Graduate Institute of Medical Sciences, UHS, Rohtak from 17-19 April 2017.</td></tr>
<tr><td>2nd Revised Basic Course Workshop in Medical Education Technologies organized under the aegis of MCI Regional Centre for Medical Education Technologies, Maulana Azad Medical College, New Delhi at Pt. B D Sharma Post Graduate Institute of Medical Sciences, UHS, Rohtak from 27-29 November 2017.</td></tr>
<tr><td>3rd Revised Basic Course Workshop in Medical Education Technologies organized under the aegis of MCI Regional Centre for Medical Education Technologies, Maulana Azad Medical College, New Delhi at Pt. B D Sharma Post Graduate Institute of Medical Sciences, UHS, Rohtak from 26-28 March 2018.</td></tr>
</table>
</div>
<div>
<table>
<tr>
<th id="pgOri">Postgraduate orientation programmes</th>
</tr>
<tr><td>“Thesis protocol writing” workshop for 1st yr MD/MS/MDS (Admn. Year 2017) was held from 4th – 9th September 2017. </td></tr>
<tr><td>“Thesis Protocol Writing” for the 1st year M.D./M.S. residents (Admission year 2018) was held 6th – 11th August, 2018.</td></tr>
</table>
</div>
<div id="contact">
<p class= heading1>Contact</p>
<h3>Dr.Sarita Maggu, Dean, PGIMS</h3>
<p>tel:7988234270</p>
<h3>Dr.Sujata Sethi, Sr.Prof Psychiatry, PGIMS</h3>
<p>tel:9466749009</p>
</div>
</div>
<div class="rightBar"></div>
<div class="footerArea">
<p><strong>Page Designed and Developed by Dept of Information Technology,Pt.B.Sharma University of Health Sciences, Rohtak. &copy sukhdevchandla#gmail.com</strong></p>
</div>
</div>
</body>
</html>
The problem is that your rows, always has a size of 1fr (one fraction) and it will be changed across you resize your viewport.
You can try not define grid-template-rows, and let that the size of the rows be automatic.
In resume, remove or comment this code:
grid-template-rows:repeat(8, 1fr);

div class doesn't seem to work

I have to build a website for school and I am having trouble with a div class.
I wanted a new div for blog posts but it doesn't seem to work. If you take a look at my css you see that I changed the height but the text didn't move down. I called the div class 'first' and wrote some text to see where it would end up.
body {}
/*---- website---*/
#header {
position: relative;
top: 10px;
left: 0px;
font-size: 25px;
font-family: Lucida Console;
color: white;
background-color: #98AFC7;
width: 100%;
height: 50px;
padding: 20px 0px 10px 0px;
}
/*----lost een bug op die li en ul laat verdwijnen----*/
.clearfix:after {
display: block;
clear: both;
}
/*----- Menu -----*/
.menu-wrap {
position: relative;
left: 120px;
top: 0px;
width: 100%;
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
}
.menu {
width: 1000px;
margin: 30px auto;
}
.menu li {
margin: 0px;
list-style: none;
font-family: 'Ek Mukta';
}
.menu a {
transition: all linear 0.15s;
color: #D7D7D7;
}
.menu li:hover>a,
.menu .current-item>a {
text-decoration: none;
color: #fff;
}
.menu .arrow {
font-size: 11px;
line-height: 0%;
}
/*----- basis menu -----*/
.menu>ul>li {
float: left;
display: inline-block;
position: relative;
font-size: 19px;
}
.menu>ul>li>a {
padding: 10px 40px;
display: inline-block;
text-shadow: 0px 1px 0px rgba(0, 0, 0, 0.4);
}
.menu>ul>li:hover>a,
.menu>ul>.current-item>a {
background: #70879F;
}
/*-----2e menu-----*/
.menu li:hover .sub-menu {
z-index: 1;
opacity: 1;
}
.sub-menu {
width: 160%;
padding: 5px 0px;
position: absolute;
top: 100%;
left: 0px;
opacity: 0;
transition: opacity linear 0.15s;
box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.2);
background: #70879F;
}
.sub-menu li {
display: block;
font-size: 16px;
}
.sub-menu li a {
padding: 10px 30px;
display: block;
}
.sub-menu li a:hover,
.sub-menu .current-item a {
background: #98AFC7;
}
.first {
margin: 600px 0px 0px 0px;
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="Home.css">
</head>
<body>
<div class="first">
tekst-tekst
</div>
<div id="header">
<center><big>No strings attached</big></center>
</div>
<!--menu-->
<div class="menu-wrap">
<nav class="menu">
<ul class="clearfix">
<li>Home</li>
<li class="current-item">Blog</li>
<li>
Webshop <span class="arrow">▼</span>
<ul class="sub-menu">
<li>Gitaren</li>
<li>Electronica</li>
<li>Overig</li>
<li>Sale</li>
</ul>
</li>
<li>Contact</li>
<li>Over mij</li>
</ul>
</nav>
</div>
</body>
</html>

Why isn't my nav class expanding to 100% of the width?

So I'm trying to understand why when I specify the width for my .thenav class it is not expanding to the entire width of the page.
I UNDERSTAND that it is taking the characteristics of the .container class, but I don't understand why and what is the solution seeing that i specified the width? PLEASE HELP!
Here is my picture of what's happening (I attached an image of what's happening because the jsfiddle makes the div appear at 100% and it's not):
http://imgur.com/a/zsBqC
Here is my jsfiddle:
https://jsfiddle.net/CheckLife/yox7Ln1b/3/
Here's the code for reference:
HTML:
<div class="header">
<div class="container">
<h1 id="box" onload="changed()"><image src="nbaone.png" width="40px" height="55px" class="nba">NBA Legends</h1>
<div class="thenav" onload="changed()">
<ul>
<li><a href="http://www.nba.com"/>Home</a></li>
<li onclick="changeP()">About</li>
<li>Players
<ul>
<li onmouseover="slow()"></li>
<li><a href="#kobesec"/>Kobe</a></li>
<li><a href="#"/>Kevin Durant</a></li>
<li><a href="#"/>The Goat</a></li>
</ul>
</li>
<li onclick="slow()">News</li>
</ul>
</div>
</div>
</div>
CSS:
* {
margin: 0;
padding: 0;
list-style-type: none;
text-decoration: none;
}
header, nav, section, aside, footer, article {
display: block;
}
body {
background-image: url(backwood.png);
width: 100%;
margin: auto;
}
.container {
margin: 0px auto;
background-size: cover;
width: 1300px;
height: 100%;
}
.header {
background:linear-gradient(to right, #5092f4, #f29641);
margin-top: 0px;
width: 100%;
}
.header h1{
text-align: center;
width: 100%;
padding-bottom: 15px;
font-family: Arial, Helvetica, sans-serif;
color: #f4ca1f;
}
.tmacw {
display:inline;
position: relative;
padding: 0px;
top: 5px;
}
.nba {
margin-right: 10px;
}
.thenav {
background-color: #7886a3;
width: 100%;
height: 85px;
position: relative;
z-index: 1;
}
/* Style for the Nav Bar */
.thenav ul {
padding: 0;
margin: 0;
}
.thenav ul li {
float: left;
width: 90px;
text-align: center;
border-right: 1px groove #141e38;
position: relative;
}
.thenav ul li a {
display: block;
color: white;
font-weight: bold;
padding: 33px 10px;
}
.thenav ul li a:hover {
background-color: #47e586;
transition: all 0.90s;
}
/*Dropdown Nav */
.thenav li ul li{
background-color: #7886a3;
border: 2px groove grey;
border-radius: 4px;
position: relative;
}
.thenav li ul li a {
padding: 8px;
text-align:left;
}
.thenav li ul li:nth-child(1) a:hover {
background-color: #F47575;
}
.thenav li ul li:nth-child(2) a:hover {
background-color: #f7d759 ;
}
.thenav li ul li a:hover{
background-color: red;
}
.thenav ul li ul {
display: none;
}
.thenav li:hover ul{
position:absolute;
}
.thenav li:hover ul{
display: block;
}
/* End of Dropdown */
.userlogin {
font-size: 12px;
top:2px;
color: white;
}
input[type=text], input[type=password] {
font-weight: bold;
margin: 0;
font-size: 8px;
height: 10px;
padding: 3px 5px 3px 5px;
color: 162354;
}
/* Stats Button */
.stat input[type=button] {
background-color: #6cd171;
color: blue;
border-radius: 6px;
font-weight: bold;
border: none;
float: left;
margin-top: 20px;
margin-left: 20px;
padding: 2px 2px;
font-family: Verdana, Geneva, sans-serif;
}
.log[type=button] {
background-color: white;
color: #008cff;
border-radius: 4px;
font-weight: bold;
border: none;
padding: 1px 2px 2px 2px;
position: relative;
left: 5px;
top: 3px;
}
A child div that does not have absolute positioning and has a width of 100% (unnecessary if it's display is the default of block) will be set to it's containers width. Your div.container has a width setting of 1300px and it is the parent element of div.thenav, therefore div.thenav's width will also be 1300px.
You can either remove width on the container:
.container {
margin: 0px auto;
background-size: cover;
/*width: 1300px; remove this */
height: 100%;
}
or:
Move div.thenav outside of div.container as in this code:
(https://jsfiddle.net/nod19rze/)
<div class="header">
<h1 id="box" onload="changed()"><image src="nbaone.png" width="40px" height="55px" class="nba">NBA Legends</h1>
<div class="thenav" onload="changed()">
<!-- contents of thenav here -->
</div>
<div class="container">
</div>
</div>
Either the container should be the first wrapper and then comes the header, which could solve the issue. I am not sure if this is what u need. Please check this fiddle:
https://jsfiddle.net/estgLn1q/1/
<div class="container">
<div class="header">
</div>
</div>
Or if you want to maintain the same html structure, then remove width:1300px from '.container' which will cause the container to take the same width as of its parent.
I would just move #box and .thenav out of .container and start that class after those elements.
* {
margin: 0;
padding: 0;
list-style-type: none;
text-decoration: none;
}
header,
nav,
section,
aside,
footer,
article {
display: block;
}
body {
background-image: url(backwood.png);
width: 100%;
margin: auto;
}
.container {
margin: 0px auto;
background-size: cover;
width: 1300px;
height: 100%;
}
.header {
background: linear-gradient(to right, #5092f4, #f29641);
margin-top: 0px;
width: 100%;
}
.header h1 {
text-align: center;
width: 100%;
padding-bottom: 15px;
font-family: Arial, Helvetica, sans-serif;
color: #f4ca1f;
}
.tmacw {
display: inline;
position: relative;
padding: 0px;
top: 5px;
}
.nba {
margin-right: 10px;
}
.thenav {
background-color: #7886a3;
width: 100%;
height: 85px;
position: relative;
z-index: 1;
}
/* Style for the Nav Bar */
.thenav ul {
padding: 0;
margin: 0;
}
.thenav ul li {
float: left;
width: 90px;
text-align: center;
border-right: 1px groove #141e38;
position: relative;
}
.thenav ul li a {
display: block;
color: white;
font-weight: bold;
padding: 33px 10px;
}
.thenav ul li a:hover {
background-color: #47e586;
transition: all 0.90s;
}
/*Dropdown Nav */
.thenav li ul li {
background-color: #7886a3;
border: 2px groove grey;
border-radius: 4px;
position: relative;
}
.thenav li ul li a {
padding: 8px;
text-align: left;
}
.thenav li ul li:nth-child(1) a:hover {
background-color: #F47575;
}
.thenav li ul li:nth-child(2) a:hover {
background-color: #f7d759;
}
.thenav li ul li a:hover {
background-color: red;
}
.thenav ul li ul {
display: none;
}
.thenav li:hover ul {
position: absolute;
}
.thenav li:hover ul {
display: block;
}
/* End of Dropdown */
.userlogin {
font-size: 12px;
top: 2px;
color: white;
}
input[type=text],
input[type=password] {
font-weight: bold;
margin: 0;
font-size: 8px;
height: 10px;
padding: 3px 5px 3px 5px;
color: 162354;
}
/* Stats Button */
.stat input[type=button] {
background-color: #6cd171;
color: blue;
border-radius: 6px;
font-weight: bold;
border: none;
float: left;
margin-top: 20px;
margin-left: 20px;
padding: 2px 2px;
font-family: Verdana, Geneva, sans-serif;
}
.log[type=button] {
background-color: white;
color: #008cff;
border-radius: 4px;
font-weight: bold;
border: none;
padding: 1px 2px 2px 2px;
position: relative;
left: 5px;
top: 3px;
<div class="header">
<h1 id="box" onload="changed()"><image src="nbaone.png" width="40px" height="55px" class="nba">NBA Legends</h1>
<div class="thenav" onload="changed()">
<ul>
<li><a href="http://www.nba.com" />Home</a>
</li>
<li onclick="changeP()">About</li>
<li>Players
<ul>
<li onmouseover="slow()">
</li>
<li><a href="#kobesec" />Kobe</a>
</li>
<li><a href="#" />Kevin Durant</a>
</li>
<li><a href="#" />The Goat</a>
</li>
</ul>
</li>
<li onclick="slow()">News</li>
</ul>
</div>
<div class="container">
</div>
</div>

I put a new menu with css+html and the others SOCIAL ICON NOT WORK ( HAVE EFFECT OF ROTATION )

I put a new menu with css+html and the others SOCIAL ICON NOT WORK ( HAVE EFFECT OF ROTATION ) please help me ... As its title, first 2 social icon not work when I add this menu Please say me what change to succeed TO WORK ALL icons ..The problem is the menu , I KNOW FOR SURE Because before he could edit it fixed over the two icons that do not work
HTML : + CSS Demo
LINK TO VIEW DEMO : https://codepen .io/GARDFIELD3/pen/WRLpdZ
I render answer winner .. SORRY FOR MY ENGLISH AND Thank :)
actually your div with id #content is overlapping the icons and hence icon dont recieve hover as they are below #content.
quick fix .. give #content a smaller width line 66 of css
eg
#content {
width: 400px;
}
* { margin: 0; padding: 0; outline: 0; }
body {
font-size: 12px;
line-height: 18px;
font-family: arial, sans-serif;
}
html,
body {
height: 100%;
}
body {
margin: 0;
background: linear-gradient(45deg, rgba(0,150,0,0.5), rgba(205, 0, 255, 0.5)),
url(http://i.imgur.com/ZR1Dkyk.jpg);
background-size: cover;
width:100%;
height:100%;
overflow:hidden;
}
#header_holder {
width: 100%;
position: fixed;
top: 0px;
left: 0;
background: #222;
z-index: 100;
}
#header {
width: 100%;
margin: auto;
height: 46px;
position: relative;
}
#max3semneblue {
float: left;
width: 100%;
height: 46px;
border-bottom: 4px solid #cc1e1e;
}
#noscrollright
::-webkit-scrollbar {
width: 5px;
}
::-webkit-scrollbar-track {
background-color:#000;
}
::-webkit-scrollbar-thumb {
background:#fff;
}
#content { width: 400px; /*change is here */
margin: 0 auto;
float: right;
padding: 1.4px 0 30px;
padding-right: 55px;
}
.icon {
margin: 0 14px;
width:40px;
border-radius:3px;
-webkit-transform: rotate(0deg);
-webkit-transition: -webkit-transform 0.25s ease-in-out;}
.icon:hover
{ -webkit-transform: rotate(350deg);
-webkit-transition: -webkit-transform 0.25s ease-in-out;}
#import url(http://fonts.googleapis.com/css?family=Raleway);
#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a,
#cssmenu #menu-button {
margin: 0;
padding: 0;
border: 0;
list-style: none;
line-height: 1;
display: block;
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
#cssmenu:after,
#cssmenu > ul:after {
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
#cssmenu #menu-button {
display: none;
}
#cssmenu {
width: auto;
font-family: Raleway, sans-serif;
line-height: 1;
}
#cssmenu > ul {
width:555PX;
BACKGROUND-COLOR: RED;
}
#cssmenu > ul > li {
float: left;
-webkit-perspective: 1000px;
-moz-perspective: 1000px;
perspective: 1000px;
}
#cssmenu.align-center > ul {
font-size: 0;
text-align: center;
}
#cssmenu.align-center > ul > li {
display: inline-block;
float: none;
}
#cssmenu.align-right > ul > li {
float: right;
}
#cssmenu > ul > li > a {
padding: 16px 20px;
font-size: 14px;
color: #ffffff;
letter-spacing: 1px;
text-transform: uppercase;
text-decoration: none;
background: #c61515;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-o-transition: all .3s;
transition: all .3s;
-webkit-transform-origin: 50% 0;
-moz-transform-origin: 50% 0;
transform-origin: 50% 0;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
}
#cssmenu > ul > li.active > a {
font-weight: bold; color: #000000;
}
#cssmenu > ul > li:hover > a,
#cssmenu > ul > li > a:hover {
color: #dff2fa;
-webkit-transform: rotateX(90deg) translateY(-23px);
-moz-transform: rotateX(90deg) translateY(-23px);
transform: rotateX(90deg) translateY(-23px);
-ms-transform: none;
}
#cssmenu > ul > li > a::before {
position: absolute;
top: 100%;
left: 0;
z-index: -1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
height: 100%;
padding: 16px 20px;
color: #dff2fa;
background: #19799f;
content: attr(data-title);
-webkit-transition: background 0.3s;
-moz-transition: background 0.3s;
transition: background 0.3s;
-webkit-transform: rotateX(-90deg);
-moz-transform: rotateX(-90deg);
transform: rotateX(-90deg);
-webkit-transform-origin: 50% 0;
-moz-transform-origin: 50% 0;
transform-origin: 50% 0;
-ms-transform: translateY(- -18px);
}
#cssmenu > ul > li:hover > a::before,
#cssmenu > ul > li > a:hover::before {
background: #3db2e1;
}
#cssmenu.small-screen {
width: 100%;
}
#cssmenu.small-screen > ul,
#cssmenu.small-screen.align-center > ul {
width: 100%;
text-align: left;
}
#cssmenu.small-screen > ul > li,
#cssmenu.small-screen.align-center {
float: none;
display: block;
border-top: 1px solid rgba(100, 100, 100, 0.1);
}
#cssmenu.small-screen > ul > li:hover > a,
#cssmenu.small-screen > ul > li > a:hover {
color: #dff2fa;
-webkit-transform: none;
-moz-transform: none;
transform: none;
-ms-transform: none;
}
#cssmenu.small-screen > ul > li > a::before {
display: none;
}
#cssmenu.small-screen #menu-button {
display: block;
padding: 16px 20px;
cursor: pointer;
font-size: 14px;
text-decoration: none;
color: #ffffff;
text-transform: uppercase;
letter-spacing: 1px;
background: #3db2e1;
}
#cssmenu.small-screen #menu-button:after {
content: "";
position: absolute;
right: 20px;
top: 17px;
display: block;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
border-top: 2px solid #ffffff;
border-bottom: 2px solid #ffffff;
width: 22px;
height: 3px;
}
#cssmenu.small-screen #menu-button.menu-opened:after {
border-top: 2px solid #dff2fa;
border-bottom: 2px solid #dff2fa;
}
#cssmenu.small-screen #menu-button:before {
content: "";
position: absolute;
right: 20px;
top: 27px;
display: block;
width: 22px;
height: 2px;
background: #ffffff;
}
#cssmenu.small-screen #menu-button.menu-opened:before {
background: #dff2fa;
}
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<title>Max3Semne #home</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" href="style.css" type="text/css" media="all" />
<!--[if IE 6]>
<link rel="stylesheet" href="css/ie6.css" type="text/css" media="all" />
<![endif]-->
<link href='http://fonts.googleapis.com/css?family=Play:400,700&subset=latin,cyrillic-ext,greek,greek-ext,latin-ext,cyrillic' rel='stylesheet' type='text/css' />
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="script.js"></script>
</head>
<body>
<div id='header_holder'>
<div id='header'>
<div id='max3semneblue'></div><div id='pink'></div><div id='green'></div><div id='orange'></div><div id='blue2'></div><div id='purple2'>
<h4 style="position: absolute; left: 80%; top: 0%"><div id="content">
<div id="content">
<a href="https://www.facebook.com/Max3Semne/">
<img src="http://wp-time.com/wp-content/uploads/2016/03/facebook.png" class="icon" /></a>
<a href="http://steamcommunity.com/groups/max3semne?l=romanian">
<img src="https://web2schools.juliarizza.com/web2schools/static/images/message-icon.png" class="icon" /></a>
<a href="http://www.max3semne.ro/forum/index.php?app=members&module=messaging">
<img src="https://upload.wikimedia.org/wikipedia/commons/d/d3/User_Circle.png" class="icon" /></a>
<a href="http://steamcommunity.com/groups/max3semne?l=romanian">
<img src="http://images.akamai.steamusercontent.com/ugc/35241878917010420/2DDCE514E0EDF58F6C0071C21EB641F16B4508CC/" class="icon" /></a> </h4>
<h3 style="position: absolute; left: 0%; top: 0%">
<div id="content">
<div id='cssmenu'>
<ul>
<li class='active'><a href='#'>Home</a></li>
<li><a href='#'>FORUM</a></li>
<li><a href='#'>SERVERE</a></li>
<li><a href='#'>ASISTENTA</a></li>
</ul>
</div> </h3>
</div>
</div>
</div>
</body>
</html>