How to make top-bar like sublime top-bar using real CSS? - css

I want to make like this but my top bar is to different i dont know how to make like this
.top-bar {
width: 100%;
height: 40px;
border: solid 1px white;
}

Please try following example. I think you can use or customize some value.
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Lato', sans-serif;
font-size: 14px;
padding: 70px;
background: #f69ec4;
}
.tabs {
margin-bottom: 30px;
}
nav,
.content {
min-width: 600px;
}
.content {
max-width: 600px;
display: block;
margin-bottom: 1em;
background: #32557f;
padding: 2em 3em;
border-radius: .15em;
border: .2em solid #fff;
color: #fff;
}
nav {
position: relative;
z-index: 1;
}
nav > a {
position: relative;
width: 10em;
display: inline-block;
padding: .7em 2em .5em;
color: #fff;
text-decoration: none;
margin: 0 -.3em;
}
nav > a::before {
border: .2em solid #fff;
}
nav a::before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
border-bottom: none;
border-radius: 1em 1em 0 0;
background: #7eb4e2;
transform: scale(1.2, 1.3) perspective(0.5em) rotateX(5deg);
}
nav a.active {
z-index: 2;
}
nav a.active::before {
background-color: #32557f;
margin-bottom: -.08em;
}
.tab-left-right nav {
padding-left: 1.3em;
}
.tab-left-right nav a::before {
transform-origin: bottom;
}
<div class="tabs tab-left-right">
<nav>
Tab1
Tab2
Tab3
</nav>
<div class="content" id="content1">Content</div>
</div>

I use ul list
.open-file-list {
position: absolute;
top: 45px;
top: var(--header-height);
height: 30px;
width: 100%;
background-color: var(--primary-color);
overflow-x: auto !important;
overflow-y: hidden !important;
display: flex;
flex-direction: row !important;
color: white;
color: var(--text-main-color)
}
.open-file-list li.tile {
min-width: -webkit-min-content;
min-width: -moz-min-content;
min-width: min-content;
height: 30px;
position: relative;
overflow: hidden;
font-size: 0.8em;
align-items: center;
margin: 0;
padding: 0;
color: inherit
}
.open-file-list li.tile::before{
position: absolute;
content: '';
background-color: black;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
border-bottom: none;
border-radius: 1em 1em 0 0;
background: #7eb4e2;
transform: scale(1.2, 1.3) perspective(0.5em) rotateX(5deg);
height: 30px;
}
.open-file-list li.tile.text{
display: inline-block;
white-space: nowrap;
max-width: 180px;
overflow: hidden;
text-overflow: ellipsis;
margin: 0;
padding-right: 10px;
color: inherit
}
.open-file-list li.tile.select {
position: absolute;
left: 0;
top: 0
}
.open-file-list li.tile.notice::before {
content: '♥';
color: #00ff00;
font-size: 1em;
margin-left: 2.5px
}
.open-file-list li.tile.active {
border-top: solid 2px #00ee00;
background-color: rgba(0,0,0,0.2)
}
.open-file-list li.tile .file,.open-file-list li.tile .icon {
height: 20px;
width: 20px;
font-size: 1em;
background-size: 14px;
background-position: center;
color: inherit
}

Related

how do I make it so my mobile responsive works on my web page?

I am trying to make my page mobile responsive but something is off. I had to change position of my nav-menu from absolute to relative for nav menu to go to the right top corner but now im having issues with the responsive part as well as the collapse of menu. i have been in tutorial hell trying to understand relative and absolute. I thought I had it but this proves i do not
/* make for mobile*/
.mobile-nav-toggle {
position: fixed;
right: 15px;
top: 15px;
z-index: 9998;
border: 0;
background: none;
font-size: 24px;
transition: all 0.4s;
outline: none !important;
line-height: 1;
cursor: pointer;
text-align: right;
}
.mobile-nav-toggle i {
color: #ffff;
}
.mobile.nav {
position: fixed;
top: 55px;
right: 15px;
bottom: 15px;
z-index: 0;
overflow-y: auto;
background: rgba(0,0,0,0.7);
}
The rest of the script :
body {
font-family: "open sans",sans-serif;
background-color: #040404;
color: #fff;
position: relative;
background: transparent;
}
body::before {
content: "";
position: fixed;
background: #040404;
left: 0;
background-size: cover;
right: 0;
top: 0;
height: 100vh;
z-index: -1;
}
#media (min-width: 1024px){
body::before {
background-attachment: fixed;
}
}
a {
color: #18d26e;
}
a:hover {
color: #18d26e;
text-decoration: none;
}
h1,h2,h3,h4,h5,h6 {
font-family: "Railewa", sans-serif;
}
/*==========Header=======*/
#header {
transition: ease-in-out 0.3s;
position: relative;
height: 100vh;
display: flex;
align-items: center;
z-index: 997;
overflow-y: auto;
}
#header * {
transition: ease-in-out 0.3s;
}
#header h1 {
font-size: 48px;
margin: 0;
padding: 0;
line-height: 1;
font-weight: 700;
font-family: "poppins",sans-serif;
}
#header h1 a,
#header h1 a:hover {
color: #fff;
line-height: 1;
display: inline-block;
}
header h2 {
font-size: 24px;
margin-top: 20px;
color: rgba(255,255,255,0.8);
}
#header h2 span {
color: #fff;
border-bottom: 2px solid #18d26e;
padding-bottom: 6px;
}
#header h2 span:hover {
color: #ffff;
border-bottom: 2px solid #ff28f4;
padding-bottom: 6px;
}
#header .social-links {
margin-top: 40px;
display: flex;
}
#header .social-links a {
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255,0.1);
color: #ffff;
line-height: 1;
margin-right: 8px;
border-radius: 50%;
width: 40px;
height: 40px;
}
#header .social-links a:hover {
background: #18d26e;
}
/*make it resposive*/
#media (max-width:992px) {
#header h1 {
font-size: 36px;
}
#header h2 {
font-size: 20px;
line-height: 30px;
}
#header .social-links {
margin-top: 15px;
}
#header .container {
display: flex;
flex-direction: column;
align-items: center;
}
}

My mediaqueries wont work even though i seperated it with its own stylesheet?

<div class="row iex-reepay">
<div class="col-lg-4 col-md-4">
<div class="after-element-pseudo">
<img src="/wp-content/uploads/sites/61/2018/10/iex-ikon-2.png" class="iex-icon"></div>
</div>
<div class="col-lg-4 col-md-4 col-lg-offset-1 col-md-offset-2"><img src="/wp-content/uploads/sites/61/2018/10/iex-ikon-2.png" class="reepay-icon"></div>
</div>
I have made a pseudo-class after element which works fine without media-queries.
When i start working responsive with my media-queries something goes wrong.
It seems like it only uses the after:element i made on large screen when media-queries is not needed.
I tried to separate my media-queries to their own stylesheet but the issue is still there. I tried to change a img size and nothing changes.
I really tried everything, validating my CSS etc.
#media screen and (max-width:1199px) {
.feature-icons-div {
margin-right: 38px;
}
.after-element:after {
content: "";
width: 55px;
height: 81px;
background-size: 55px 19px;
display: inline-block;
background-image: url(/wp-content/uploads/sites/61/2018/10/arrow-after-element.png);
background-repeat: no-repeat;
vertical-align: middle;
position: absolute;
bottom: 36px;
right: -79px;
}
}
#media screen and (max-width:992px) {
.reepay div#manage-subscribtion-section section#themo_service_block_split_1 {
padding-top: 60px;
padding-bottom: 95px;
}
}
#media screen and (max-width:991px) {
.after-element {
position: relative;
}
.after-element-pseudo:after {
content: "";
width: 55px;
height: 81px;
background-size: 55px 19px;
display: inline-block;
background-image: url(/wp-content/uploads/sites/61/2018/10/arrow-after-element.png);
background-repeat: no-repeat;
vertical-align: middle;
position: absolute;
bottom: 36px;
right: 42px;
}
img.reepay-icon {
max-width: 93px;
}
img.iex-icon {
max-width: 93px;
}
.iex-icons-div {
margin-top: 45px;
}
.reepay h2 {
color: #4f4f4f !important;
font-size: 24px;
}
.reepay div#manage-subscribtion-section section#themo_service_block_split_1 {
padding-top: 60px;
padding-bottom: 275px;
}
div#reepay-integeration-top section#themo_iex_block_visma_1 li p {
font-size: 20px;
}
div#reepay-integeration-top #themo_iex_block_visma_1 {
padding-top: 145px;
padding-bottom: 25px;
}
}
#media screen and (max-width:767px) {
.reepay h1 {
font-size: 34px;
}
img.subscribtion-image {
margin-top: 286px;
}
.reepay div#manage-subscribtion-section section#themo_service_block_split_1 {
padding-top: 60px;
padding-bottom: 106px;
}
.reepay .split-blocks .service-block p {
margin-left: 34px;
}
/*
.border-without-background-feature:after {
content: "";
width: 59px;
height: 81px;
background-size: 52px 19px;
display: inline-block;
background-image: url(/wp-content/uploads/sites/61/2018/10/arrow-after-element.png);
background-repeat: no-repeat;
vertical-align: middle;
position: absolute;
top: 129px;
transform: rotate(89deg);
} */
.border-radius-for-iex:after {
content: "";
width: 59px;
height: 81px;
background-size: 52px 19px;
display: inline-block;
background-image: url(/wp-content/uploads/sites/61/2018/10/arrow-after-element.png);
background-repeat: no-repeat;
vertical-align: middle;
position: absolute;
right: 58px;
transform: rotate(89deg);
/* bottom: -111px; */
top: 132px;
}
.iex-icons-div {
margin-left: 0;
}
.border-radius-for-iex {
display: inline-block;
height: 120px;
width: 120px;
border-radius: 50%;
background-color: #fff;
position: relative;
/* margin: auto 0; */
margin-left: 104px;
}
.border-without-background-feature {
position: relative;
display: inline-block;
margin-left: 96px;
}
}
#media screen and (max-width:540px) {
.reepay .split-blocks .service-block p {
margin-left: 14px;
}
.reepay h1 {
font-size: 24px;
}
div#order-right-now .iex-btnn {
background-color: #15d384;
border: none;
color: white;
padding: 14px 49px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 18px;
border-radius: 26px;
}
.reepay h2 {
color: #4f4f4f !important;
font-size: 20px;
}
div#order-right-now .iex-btnn {
background-color: #15d384;
border: none;
color: white;
padding: 14px 60px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 18px;
border-radius: 26px;
}
}
#media screen and (max-width:320px) {
img.center-block.reepay-header-dashboard {
padding-top: 35px;
padding-right: 22px;
}
.reepay h1 {
font-size: 24px;
}
div#reepay-integeration-top section#themo_iex_block_visma_1 li p:before {
content: "";
width: 55px;
height: 81px;
background-size: 25px 19px;
display: inline-block;
background-image: url(/wp-content/uploads/sites/61/2018/10/arrow.png);
background-repeat: no-repeat;
vertical-align: middle;
position: absolute;
left: -19px;
top: 6px;
}
div#reepay-integeration-top section#themo_iex_block_visma_1 li p {
font-size: 17px;
}
}
/* This is for all the h1 on the site */
.reepay h1 {
font-size: 37px;
}
/* This is for all the h2 on the site */
.reepay h2 {
color: #4f4f4f !important;
}
div#reepay-integeration-top em {
font-style: normal;
font-weight: 900;
font-size: 46px;
}
/* This is the header of the Reepay site start */
.reepay .navbar {
background-color: #fff;
margin-bottom: 0;
background-color: #0464ab !important;
}
.reepay .navbar .navbar-nav>li.active>a {
color: #fff;
text-transform: initial;
font-size: 20px;
}
.reepay html .navbar .navbar-nav>li>a:hover:after,
html .navbar .navbar-nav>li.active>a:after,
html .navbar .navbar-nav>li.active>a:hover:after,
html .navbar .navbar-nav>li.active>a:focus:after {
bottom: 5px;
background-color: #fff;
display: none;
}
.reepay .navbar .navbar-nav>li.active>a,
.navbar .navbar-nav>li.active>a:hover,
.navbar .navbar-nav>li.active>a:focus {
color: #fff;
}
.reepay .navbar-default {
background-color: #0464ab;
border-color: #0464ab;
}
/* This is the header of the Reepay site end */
/* Second section start */
div#reepay-integeration-top #themo_iex_block_visma_1 {
padding-top: 96px;
padding-bottom: 0px;
}
div#reepay-integeration-top li p {
margin-top: 12px;
}
div#reepay-integeration-top li {
list-style: none;
}
div#reepay-integeration-top section#themo_iex_block_visma_1 li p {
font-size: 23px;
}
div#reepay-integeration-top section#themo_iex_block_visma_1 li p:before {
content: "";
width: 55px;
height: 81px;
background-size: 25px 19px;
display: inline-block;
background-image: url(/wp-content/uploads/sites/61/2018/10/arrow.png);
background-repeat: no-repeat;
vertical-align: middle;
position: absolute;
left: -19px;
top: 16px;
}
img.center-block.reepay-header-dashboard {
padding-top: 35px;
}
/* This is the section for order now button */
div#order-right-now .iex-btnn {
background-color: #15d384;
border: none;
color: white;
padding: 14px 99px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 18px;
border-radius: 26px;
}
div#order-right-now section#themo_iex_brands_1 {
padding-top: 6px;
padding-bottom: 30px;
}
/* This is the section of manage-subscribtion */
div#manage-subscribtion-section p {
color: #4f4f4f;
font-size: 19px;
}
img.manage-subscribtion-icons {
margin-top: 30px;
}
.reepay div#manage-subscribtion-section section#themo_service_block_split_1 {
padding-top: 60px;
padding-bottom: 40px;
}
/* Remove the borders that i cant remove from the backend, i thuink it gets shout out from somewhere else to all subsites */
.reepay .border-wrap.top .border {
border-left: 2560px solid #e5e5e4;
border-top: 70px solid transparent;
border-right: 0 solid transparent;
border-bottom: 0 solid transparent;
display: none;
}
.reepay .border-wrap.bottom .border {
border-left: 2560px solid #e5e5e4;
border-top: 0 solid;
border-right: 0 solid transparent;
border-bottom: 70px solid transparent;
display: none;
}
.reepay section#themo_iex_testimonials_1 {
display: none;
padding-top: 5px;
padding-bottom: 5px;
}
/* This is the service-block section */
div#service-block-for-glyphicons h2 {
text-align: center;
margin-bottom: 50px;
padding-top: 15px;
}
div#service-block-for-glyphicons .service-blocks-horiz {
padding-top: 60px;
padding-bottom: 40px;
}
/* Feature page --------- --------- --------- --------- --------- --------- --------- --------- --------- --------- --------- --------- --------- --------- --------- */
div#feature-integeration-top section#themo_iex_block_visma_1 {
padding-top: 24px;
padding-bottom: 0px;
}
div#feature-integeration-top p {
font-size: 23px;
}
/* manage subscribtion for feature */
.border-radius-for-iex img {
position: absolute;
left: 28px;
top: 17px;
}
.border-radius-for-iex {
display: inline-block;
height: 120px;
width: 200x;
width: 120px;
border-radius: 50%;
background-color: #fff;
position: relative;
}
/* after element for the manage subscribtion feature page */
.reepay section#themo_html_1 {
padding-top: 8px;
padding-bottom: 275px;
}
.inner-wrapper {
background-color: #fff;
/* margin: auto 0; */
text-align: center;
}
.remove-bullet li:before {
content: "";
width: 55px;
height: 81px;
background-size: 25px 19px;
display: inline-block;
background-image: url(/wp-content/uploads/sites/61/2018/10/Vector-Smart-Object-copy-3.png);
background-repeat: no-repeat;
vertical-align: middle;
position: absolute;
left: -6px;
/* top: 18px; */
}
.inner-wrapper p {
font-size: 20px;
padding-bottom: -5px;
padding-bottom: 7px;
margin-bottom: 0px;
color: #2083c2;
}
.remove-bullet li {
color: #fff;
font-size: 15px;
margin-top: 20px;
padding-left: 9px;
}
.remove-bullet {
list-style: none;
}
#fff .remove-bullet li {
text-align: center;
}
.row.four-logo {
padding-top: 15px;
padding-bottom: 15px;
background-color: #fff;
margin-top: 24px;
}
img.uniconta {
max-width: 200px;
}
img.billy {
max-width: 190px;
}
img.dinero {
max-width: 190px;
}
img.economic {
max-width: 191px;
}
.row.iex-reepay {
text-align: center;
}
.after-element-pseudo:after {
content: "";
width: 55px;
height: 81px;
background-size: 55px 19px;
display: inline-block;
background-image: url(/wp-content/uploads/sites/61/2018/10/arrow-after-element.png);
background-repeat: no-repeat;
vertical-align: middle;
position: absolute;
bottom: 36px;
right: -61px;
}
.row.iex-reepay {
position: relative;
}
/* This is the section for the media queries */
Did you use your separated media-queries CSS link after main style? You have to use all responsive code after main style to get priority.

progressbar in css inside modal bootstrap z-index issue

I have my progresbar written in css and line between first and second circle hovers a little the number "2". The lines beetwen circles are pseudelements.
This is the styles i used:
/* progressbar */
.progressbar {
width: 100%;
counter-reset: step;
margin-top: 7px;
padding: 0;
}
.progressbar li {
list-style-type: none;
float: left;
width: 100px;
position: relative;
text-align: center;
font-family: sans-serif;
font-size: 15px;
font-weight: normal;
color: #546A79;
/* Steps*/
}
.progressbar li:before {
content: counter(step);
counter-increment: step;
width: 44px;
height: 44px;
line-height: 44px;
/* border: 4px solid #fff; */
display: block;
text-align: center;
margin: 0 auto 13px auto;
border-radius: 50%;
background-color: #E3E3E3;
/* Circles*/
}
.progressbar li:after {
content: '';
position: absolute;
width: 100%;
height: 4px;
background-color: #E3E3E3;
/*lines */
top: 20px;
left: -50%;
z-index: 0;
}
.progressbar li:first-child:after {
content: none;
}
.progressbar li.active {
color: #546A79;
}
.progressbar li.active:before {
width: 48px;
height: 48px;
line-height: 48px;
border-radius: 50%;
border-color: #0073CF;
color: black;
background-color: #ffda47;
margin: 0 auto 9px auto;
}
.progressbar li.active + li.active:after {
background-color: #ffda47;
}
Here's jsfiddle of the problem:
http://jsfiddle.net/1aeur58f/523/
.progressbar li {
list-style-type: none;
float: left;
width: 100px;
position: relative;
text-align: center;
font-family: sans-serif;
font-size: 15px;
font-weight: normal;
color: #546A79;
z-index:1;
}
.progressbar li:after {
content: '';
position: absolute;
width: 100%;
height: 4px;
background-color: #E3E3E3;
/*lines */
top: 20px;
left: -50%;
/*z-index: 0;*/
z-index: -1;
}
for ".progressbar li:after" now its z-index:-1; make this z-index:-1;
and z-index:1; for ".progressbar li" your ul item.

profile icon dropdown tolltip with arrow

This has been really frustrating. I'm trying to add a dropdown tooltip at the bottom of my profile avatar. Unfortunately that does not seem to work properly. The tooltip seems to be partly hidden. How can i keep the specific design of the tooltip and make it display directly at the bottom of the icon with the arrow pointing in the middle of the icon?
body {
background-color: #36a4b0;
}
#shell-header {
display: flex;
height: 46px;
overflow: hidden;
z-index: 3;
opacity: 1;
white-space: nowrap;
}
.logo-wrapper {
padding-left: 56px;
}
#media (max-width: 480px) {
.logo-wrapper {
padding-left: 1rem;
}
}
.title-wrapper {
left: 0;
right: 0;
text-align: right;
flex-grow: 1;
}
.avatar-wrapper {
padding-right: 56px;
position: relative;
}
#media (max-width: 480px) {
.avatar-wrapper {
padding-right: 1rem;
}
}
.logo {
height: 30px;
line-height: 40px;
max-width: 96px;
margin-top: 0.35rem;
}
.log-shellHeaderTitle {
font-size: 20px;
line-height: 36px;
color: #fff;
text-overflow: ellipsis;
text-align: center;
display: block;
white-space: nowrap;
overflow: hidden;
font-weight: inherit;
margin-left: 0px;
margin-top: 0px;
margin-bottom: 0px;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
}
.log-langButton {
padding-right: 40px;
}
#media only screen and (max-width: 480px) {
.log-langButton {
padding-right: 10px;
}
}
#log-LangButtSwitch {
background: transparent;
cursor: pointer;
display: block;
position: relative;
float: left;
width: 40px;
padding: 2px;
margin-top: 0.25rem;
border: 2px solid #fff;
border-radius: 28px;
}
.log-switchHandle {
display: block;
background: #fff;
height: 20px;
width: 20px;
z-index: 9999;
border-radius: 20px;
}
.log-switchLabels {
position: absolute;
top: 5px;
z-index: -1;
width: 100%;
font-family: Helvetica, sans-serif;
font-weight: bold;
color: #fff;
text-transform: uppercase;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
}
.log-switchLabels:before {
content: "EN";
position: absolute;
left: 21px;
font-size: 12px;
}
.log-switchLabels:after {
content: "DE";
position: absolute;
right: 26px;
font-size: 12px;
}
.fa-user-o:before {
font-size: 1.375rem;
color: #fff;
}
.avatar {
text-align: center;
margin-top: 0.35rem;
width: 25px;
}
.log-popover {
visibility: visible;
z-index: 460;
display: block;
overflow: visible;
top: 121px;
left: 375.063px;
bottom: 10px;
transition: opacity 0.2s linear;
color: #333333;
min-width: 100px;
box-sizing: border-box;
outline: none;
max-width: 100%;
max-height: 84px;
min-height: 2rem;
overflow: hidden;
background: #ffffff;
border: none;
box-shadow: 0 0.625rem 1.875rem 0 rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.15);
border-radius: 0.25rem;
}
.log-popover a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.log-popover a:hover {
background-color: #f0f0f0;
}
.log-popover a:active,
.log-popover a:focus {
background: #e8eff6;
outline: 1px dotted #000000;
outline-offset: -2px;
}
.log-popover:after,
.log-popover:before {
bottom: 100%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.log-popover:after {
border-color: rgba(255, 255, 255, 0);
border-bottom-color: #fff;
border-width: 10px;
margin-left: -10px;
}
.log-popover:before {
border-color: rgba(51, 51, 51, 0);
border-bottom-color: #333333;
border-width: 11px;
margin-left: -11px;
}
.log-toolContainer {
position: absolute;
height: 100%;
width: 100%;
}
<div class="log-container">
<div id="shell-header">
<div class="logo-wrapper">
<img src="https://s-media-cache-ak0.pinimg.com/236x/f7/0a/f6/f70af6169bbe3f8346e64a25d54bafea.jpg" class="logo">
</div>
<div class="title-wrapper">
<div class="log-shellHeaderTitle">Dashboard</div>
</div>
<div class="log-langButton">
<div id="log-LangButtSwitch">
<span class="log-switchHandle"></span>
<span class="log-switchLabels"></span>
</div>
</div>
<div class="avatar-wrapper">
<img class="avatar" src="https://www.talentenportaalhellendoorn.nl/thumbnails/man.png">
<div class="log-toolContainer">
<div class="log-popover">
Profile
Log out
</div>
</div>
</div>
</div>
</div>
remove overflow: hidden; from #shell-header so the menu isn't cut off, then use positioning to put the container for the menu in the bottom/left of the parent, and use translateX() to offset it 50% of it's own width + 50% of the avatar width to center it under the icon.
body {
background-color: #36a4b0;
}
#shell-header {
display: flex;
height: 46px;
z-index: 3;
opacity: 1;
white-space: nowrap;
}
.logo-wrapper {
padding-left: 56px;
}
#media (max-width: 480px) {
.logo-wrapper {
padding-left: 1rem;
}
}
.title-wrapper {
left: 0;
right: 0;
text-align: right;
flex-grow: 1;
}
.avatar-wrapper {
padding-right: 56px;
position: relative;
}
#media (max-width: 480px) {
.avatar-wrapper {
padding-right: 1rem;
}
}
.logo {
height: 30px;
line-height: 40px;
max-width: 96px;
margin-top: 0.35rem;
}
.log-shellHeaderTitle {
font-size: 20px;
line-height: 36px;
color: #fff;
text-overflow: ellipsis;
text-align: center;
display: block;
white-space: nowrap;
overflow: hidden;
font-weight: inherit;
margin-left: 0px;
margin-top: 0px;
margin-bottom: 0px;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
}
.log-langButton {
padding-right: 40px;
}
#media only screen and (max-width: 480px) {
.log-langButton {
padding-right: 10px;
}
}
#log-LangButtSwitch {
background: transparent;
cursor: pointer;
display: block;
position: relative;
float: left;
width: 40px;
padding: 2px;
margin-top: 0.25rem;
border: 2px solid #fff;
border-radius: 28px;
}
.log-switchHandle {
display: block;
background: #fff;
height: 20px;
width: 20px;
z-index: 9999;
border-radius: 20px;
}
.log-switchLabels {
position: absolute;
top: 5px;
z-index: -1;
width: 100%;
font-family: Helvetica, sans-serif;
font-weight: bold;
color: #fff;
text-transform: uppercase;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
}
.log-switchLabels:before {
content: "EN";
position: absolute;
left: 21px;
font-size: 12px;
}
.log-switchLabels:after {
content: "DE";
position: absolute;
right: 26px;
font-size: 12px;
}
.fa-user-o:before {
font-size: 1.375rem;
color: #fff;
}
.avatar {
text-align: center;
margin-top: 0.35rem;
width: 25px;
}
.log-popover {
visibility: visible;
z-index: 460;
display: block;
overflow: visible;
top: 121px;
left: 375.063px;
bottom: 10px;
transition: opacity 0.2s linear;
color: #333333;
min-width: 100px;
box-sizing: border-box;
outline: none;
max-width: 100%;
max-height: 84px;
min-height: 2rem;
overflow: hidden;
background: #ffffff;
border: none;
box-shadow: 0 0.625rem 1.875rem 0 rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.15);
border-radius: 0.25rem;
}
.log-popover a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.log-popover a:hover {
background-color: #f0f0f0;
}
.log-popover a:active,
.log-popover a:focus {
background: #e8eff6;
outline: 1px dotted #000000;
outline-offset: -2px;
}
.log-popover:after,
.log-popover:before {
bottom: 100%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.log-popover:after {
border-color: rgba(255, 255, 255, 0);
border-bottom-color: #fff;
border-width: 10px;
margin-left: -10px;
}
.log-popover:before {
border-color: rgba(51, 51, 51, 0);
border-bottom-color: #333333;
border-width: 11px;
margin-left: -11px;
}
.log-toolContainer {
position: absolute;
height: 100%;
width: 100%;
top: 100%;
left: 0;
transform: translateX(calc(-50% + 12.5px));
}
<div class="log-container">
<div id="shell-header">
<div class="logo-wrapper">
<img src="https://s-media-cache-ak0.pinimg.com/236x/f7/0a/f6/f70af6169bbe3f8346e64a25d54bafea.jpg" class="logo">
</div>
<div class="title-wrapper">
<div class="log-shellHeaderTitle">Dashboard</div>
</div>
<div class="log-langButton">
<div id="log-LangButtSwitch">
<span class="log-switchHandle"></span>
<span class="log-switchLabels"></span>
</div>
</div>
<div class="avatar-wrapper">
<img class="avatar" src="https://www.talentenportaalhellendoorn.nl/thumbnails/man.png">
<div class="log-toolContainer">
<div class="log-popover">
Profile
Log out
</div>
</div>
</div>
</div>
</div>
Remove overflow hidden from #shell-header...
body {
background-color: #36a4b0;
}
#shell-header {
display: flex;
height: 46px;
overflow: visible;
z-index: 3;
opacity: 1;
white-space: nowrap;
}
.logo-wrapper {
padding-left: 56px;
}
#media (max-width: 480px) {
.logo-wrapper {
padding-left: 1rem;
}
}
.title-wrapper {
left: 0;
right: 0;
text-align: right;
flex-grow: 1;
}
.avatar-wrapper {
padding-right: 56px;
position: relative;
}
#media (max-width: 480px) {
.avatar-wrapper {
padding-right: 1rem;
}
}
.logo {
height: 30px;
line-height: 40px;
max-width: 96px;
margin-top: 0.35rem;
}
.log-shellHeaderTitle {
font-size: 20px;
line-height: 36px;
color: #fff;
text-overflow: ellipsis;
text-align: center;
display: block;
white-space: nowrap;
overflow: hidden;
font-weight: inherit;
margin-left: 0px;
margin-top: 0px;
margin-bottom: 0px;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
}
.log-langButton {
padding-right: 40px;
}
#media only screen and (max-width: 480px) {
.log-langButton {
padding-right: 10px;
}
}
#log-LangButtSwitch {
background: transparent;
cursor: pointer;
display: block;
position: relative;
float: left;
width: 40px;
padding: 2px;
margin-top: 0.25rem;
border: 2px solid #fff;
border-radius: 28px;
}
.log-switchHandle {
display: block;
background: #fff;
height: 20px;
width: 20px;
z-index: 9999;
border-radius: 20px;
}
.log-switchLabels {
position: absolute;
top: 5px;
z-index: -1;
width: 100%;
font-family: Helvetica, sans-serif;
font-weight: bold;
color: #fff;
text-transform: uppercase;
text-shadow: 0 1px rgba(255, 255, 255, 0.5);
}
.log-switchLabels:before {
content: "EN";
position: absolute;
left: 21px;
font-size: 12px;
}
.log-switchLabels:after {
content: "DE";
position: absolute;
right: 26px;
font-size: 12px;
}
.fa-user-o:before {
font-size: 1.375rem;
color: #fff;
}
.avatar {
text-align: center;
margin-top: 0.35rem;
width: 25px;
}
.log-popover {
visibility: visible;
z-index: 460;
display: block;
overflow: visible;
top: 121px;
left: 375.063px;
bottom: 10px;
transition: opacity 0.2s linear;
color: #333333;
min-width: 100px;
box-sizing: border-box;
outline: none;
max-width: 100%;
max-height: 84px;
min-height: 2rem;
overflow: hidden;
background: #ffffff;
border: none;
box-shadow: 0 0.625rem 1.875rem 0 rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.15);
border-radius: 0.25rem;
}
.log-popover a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.log-popover a:hover {
background-color: #f0f0f0;
}
.log-popover a:active,
.log-popover a:focus {
background: #e8eff6;
outline: 1px dotted #000000;
outline-offset: -2px;
}
.log-popover:after,
.log-popover:before {
bottom: 100%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.log-popover:after {
border-color: rgba(255, 255, 255, 0);
border-bottom-color: #fff;
border-width: 10px;
margin-left: -10px;
}
.log-popover:before {
border-color: rgba(51, 51, 51, 0);
border-bottom-color: #333333;
border-width: 11px;
margin-left: -11px;
}
.log-toolContainer {
position: absolute;
height: 100%;
width: 100%;
}
<div class="log-container">
<div id="shell-header">
<div class="logo-wrapper">
<img src="https://s-media-cache-ak0.pinimg.com/236x/f7/0a/f6/f70af6169bbe3f8346e64a25d54bafea.jpg" class="logo">
</div>
<div class="title-wrapper">
<div class="log-shellHeaderTitle">Dashboard</div>
</div>
<div class="log-langButton">
<div id="log-LangButtSwitch">
<span class="log-switchHandle"></span>
<span class="log-switchLabels"></span>
</div>
</div>
<div class="avatar-wrapper">
<img class="avatar" src="https://www.talentenportaalhellendoorn.nl/thumbnails/man.png">
<div class="log-toolContainer">
<div class="log-popover">
Profile
Log out
</div>
</div>
</div>
</div>
</div>

h1 tag positioning on mobile browser

I cant seem to figure out why the h1 tag is showing differently on mobile browsers.
The site is www.jd-financialservices.co.uk When I view the site on my desktop everything is fine. When I view it on my Nexus 4 however, the 10px gap between h1 and the .topbar div has gone. It's the same on Opera, Firefox and Chrome.
Can anyone help please?
Thank you in advance.
I would advise against using position:relative; and negative top on all of your elements.
With some minor changes to your css you will probably find that it fixes itself: here is my updated version of your css. See if that fixes things.
I updated: aside nav h1 .welcome and footer. By changing some of the header elements to use position:absolute and then using margin to space elements out. You will probably find the css is more compatible cross-browser/device.
#font-face { font-family: 'Constantia'; src: url('constantia/constantia.eot'); src: url('constantia/constantia.eot?#iefix') format('embedded-opentype'), url('constantia/constantia.svg#Constantia') format('svg'), url('constantia/constantia.woff') format('woff'), url('constantia/constantia.ttf') format('truetype'); font-weight: normal; font-style: normal;}
* {
margin-top: 0px;
margin-bottom: 0px;
}
html {
font-family: 'droid sans';
-webkit-font-smoothing: antialiased;
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
}
body {
width: 940px;
margin: 0 auto;
}
li {
list-style: none;
}
a {
text-decoration: none;
color: #ffffff;
}
a:hover {
text-decoration: underline;
}
header a:hover {
text-decoration: none;
}
h1 {
font-family: 'Constantia', helvetica;
position: absolute;
top: 20px;
}
header {
height: 140px;
position: relative;
margin-bottom: 40px;
}
nav {
width: 660px;
height: 30px;
background-color: #00788a;
position: absolute;
font-size: 1.2em;
bottom: 0;
right: 0;
}
nav li a {
color: #ffffff;
}
nav a:hover {
text-decoration: underline;
}
nav ul {
padding-left: 0px;
}
nav ul li {
display: inline;
line-height: 30px;
vertical-align: middle;
color: #ffffff;
padding-left: 70px;
padding-right: 65px;
}
aside {
height: 600px;
width: 240px;
float: left;
background-color: #00788a;
color: #ffffff;
clear: both;
position: relative;
text-align: center;
margin-bottom: 30px;
}
article a {
color: #00788a;
}
.contain {
width: 940px;
}
footer {
height: 100px;
clear: both;
background-color: #00788a;
color: rgba(255,255,255,0.5);
position: relative;
font-size: 0.85em;
padding: 0 10px;
line-height: 1.5em;
margin-top: 40px;
}
footer li {
display: inline;
border-left: 2px solid rgba(255,255,255,0.5);
padding: 0 5px;
}
footer li:first-child {
border: none;
}
footer ul {
padding-left: 0;
text-align: center;
}
.foot_fade {
color: rgba(255,255,255,0.5);
}
.first_initial {
font-size: 110px;
color: #00788a;
font-weight: lighter;
}
.second_initial {
font-size: 101px;
color: #00788a;
font-weight: lighter;
position: relative;
top: -6px;
}
.rest_of_title {
font-size: 26px;
position: relative;
left: -73px;
top: 20px;
font-weight: lighter;
}
header a {
color: #000000;
}
.header_background {
float: right;
position: relative;
z-index: -1;
}
.topbar {
width: 940px;
height: 30px;
background-color: #00788a;
}
.call_now {
padding: 10px 50px 10px 50px;
font-size: 1.5em;
line-height: 1.5em;
border-bottom: 5px solid #ffffff;
text-shadow: 2px 2px 2px #2a2a2a;
}
.home_service {
padding: 10px 40px 10px 40px;
font-size: 1.45em;
line-height: 1.5em;
border-bottom: 5px solid #ffffff;
text-shadow: 2px 2px 2px #2a2a2a;
}
.service_list {
font-size: 1.25em;
line-height: 3em;
text-align: left;
padding-top: 35px;
padding-left: 20px;
text-shadow: 2px 2px 2px #2a2a2a;
}
.welcome {
width: 660px;
float: right;
padding: 0px 0px 0px 40px;
font-size: 0.9em;
line-height: 2em;
color: #2a2a2a;
position: relative;
/* top: -95px; */
text-align: justify;
}
.services {
width: 660px;
float: right;
padding: 0px 0px 0px 40px;
position: relative;
top: -95px;
}
.services a {
text-decoration: none;
position: absolute;
top: 151px;
left: 0;
width: 275px;
color: #ffffff;
background-color: rgba(0,0,0,0.5);
padding: 10px 0 10px 10px;
}
.services div {
margin-bottom: 15px;
}
.services div:last-child {
margin-bottom: 0;
}
.savings_pic {
position: relative;
height: 190px;
width: 285px;
}
.retire_pic {
position: absolute;
top: 0;
right: 0;
height: 190px;
width: 285px;
}
.protection_pic {
position: relative;
height: 190px;
width: 285px;
}
.insurance_pic {
position: absolute;
top: 205px;
right: 0;
height: 190px;
width: 285px;
}
.mortgage_pic {
position: relative;
height: 190px;
width: 285px;
}
.retire {
width: 300px;
float: right;
margin: 0 0 10px 10px;
}
/*.shadow {
box-shadow: 0 0 3px 1px rgba(42,42,42,0.5);
margin: 3px 0;
}*/
.overlay {
background-color: rgba(0, 0, 0, 0.5);
bottom: 54px;
color: #FFFFFF;
padding: 10px;
position: relative;
width: 265px;
}
.overlay a {
text-decoration: none;
color: #ffffff;
}
.overlay a:hover {
}
.left {
float: left;
}
.right {
float: right;
}
.regulation {
font-style: italic;
color: #9a9a9a;
font-size: 0.9em;
}
.smallprint {
width: 520px;
font-size: 0.9em;
text-align: center;
position: absolute;
right: 210px;
top: 30px;
}
.copyright {
width: 310px;
margin: 0 auto;
}
.scapa {
position: absolute;
bottom: 0;
right: 10px;
font-size: 0.9em;
}

Resources