I am creating a design of controls to personalize the reproduction of videos, having some errors in the design there is a disorder in the design and even more when it comes to visualizing in different type of responsive screen.
In the design of the Speed as I can order them with a drop-down menu as shown in the following example image:
How can I give the correct style to the progress bar similar to the following image:
And carry an adaptive order similar to it.
My code complete:
.seeker {
position: relative;
width: 54%;
margin: 0 1%;
display: inline-block;
margin-right: 5px;
margin: 0 10px;
}
.trackbar {
position: absolute;
width: 100%;
height: 1px;
top: 12px;
z-index: -2;
background: rgba(255,255,255,0.7);
}
.progressbar {
position: absolute;
left: 0;
top: 12px;
width: 0;
height: 1px;
border: 0;
background-color: red;
color: red;
z-index: 0;
pointer-events: none;
}
.content-video-player {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 40px;
/*background: -webkit-linear-gradient(left,rgba(0,0,0,.7) 0px,rgba(0,0,0,.7) 95px,transparent 95px,transparent 98px,rgba(0,0,0,.7) 98px);*/
background: rgba(0,0,0,.7);
-webkit-transition: bottom .4s ease-in;
}
.content-video-player div.btn {
width: 95px;
text-align: center;
float: left;
}
.btnPlay::after {
content: "";
background-image: url(http://svgshare.com/i/3um.svg);
width: 50px;
height: 50px;
display: inline-block;
background-size: cover;
position: relative;
top: -7px;
}
.btnStop::after {
content: "";
background-image: url(http://svgshare.com/i/3vz.svg);
width: 65px;
height: 65px;
display: inline-block;
background-size: cover;
position: relative;
top: -7px;
}
.video-time-player {
float: right;
color: #ccc;
text-align: center;
width: 15%;
}
.volume {
position: relative;
cursor: pointer;
width: 70px;
height: 10px;
float: right;
margin-top: 10px;
margin-right: 10px;
}
.volumeBar {
display: block;
height: 30%;
position: absolute;
top: 0;
left: 0;
background-color: #a4c9ec;
z-index: 10;
}
.sound, .btnFS {
border: none;
float: right;
}
.sound::after {
content: "";
background-image: url(http://svgshare.com/i/3v6.svg);
width: 45px;
height: 40px;
display: inline-block;
background-size: cover;
position: relative;
top: -4px;
}
.btnFS::after {
content: "";
background-image: url(http://svgshare.com/i/3u5.svg);
width: 25px;
height: 25px;
display: inline-block;
background-size: cover;
position: relative;
top: 6px;
}
<!-- Container of the controls vidio players -->
<div class="content-video-player">
<div class="btnPlay btn" title="Play/Pause video"></div>
<div class="btnStop btn" title="Stop video"></div>
<div class="spdText btn">Speed: </div>
<div class="btnx1 btn text selected" title="Normal speed">x1</div>
<div class="btnx3 btn text" title="Fast forward x3">x3</div>
<div id="seeker" class="seeker">
<div class="trackbar"></div>
<div id="progressbar" class="progressbar" style="width: 114.7px;">
<span class="bufferBar"></span>
<span class="timeBar"></span>
</div>
<div class="video-time-player">
<span class="current">00:03</span> /
<span class="duration">00:03</span>
</div>
</div>
<div class="btnFS" title="Switch to full screen"></div>
<div class="volume" title="Set volume">
<span class="volumeBar" style="width: 84.2857%;"></span>
</div>
<div class="sound sound2" title="Mute/Unmute sound"></div>
</div>
The player layout is mainly 3 components (display: inline-table) within .content-video-player (display:table):
.playbackComponent | .timeComponent | .modComponent
▶ ] [ ⏸ ] [ X ] |_____ 07:22/15:01 | 🔉||||||| ⛶
The controls in each of the components have display:table-cell for a stable linear layout and position:absolute for finer grain adjustments. Included is a menu to adjust playbackRate, just hover over the 3rd button from the left X
Demo
*,
*::after,
*::before {
margin: 0;
padding: 0;
border: 0 none rgba(0, 0, 0, 0);
}
body {
overflow-y: scroll;
}
.content-video-player>* {
display: inline-table;
}
.content-video-player {
position: relative;
transform: translateY(68vh);
left: 0;
width: 100%;
height: 40px !important;
background: rgba(0, 0, 0, .7);
transition: bottom .4s ease-in;
display: table;
table-layout: fixed;
}
.seeker {
position: absolute;
width: 30%;
display: table-cell;
margin: 0 5px;
top: calc(50% - 6px);
left: 100px;
}
.trackbar {
position: absolute;
width: 100%;
height: 1px;
top: 12px;
z-index: -2;
background: rgba(255, 255, 255, 0.7);
}
.progressbar {
position: absolute;
left: 0;
top: 12px;
width: 0;
height: 1px;
border: 0;
background-color: red;
color: red;
z-index: 0;
pointer-events: none;
}
.content-video-player button.btn {
width: 48px;
text-align: center;
background-color: rgba(0, 0, 0, 0);
display: table-cell;
}
.btnPlay::after {
content: "";
background-image: url(http://svgshare.com/i/3um.svg);
width: 48px;
height: 48px;
display: table-cell;
background-size: cover;
position: absolute;
top: -4px;
}
.btnStop::after {
content: "";
background-image: url(http://svgshare.com/i/3vz.svg);
width: 56px;
height: 56px;
display: table-cell;
background-size: cover;
position: absolute;
left: 25px;
top: calc(50% - 28px);
}
.btnSpd {
transform: translateX(-35px);
height: 48px;
width: 48px;
font-size: 24px;
top: calc(50% - 24px);
}
.video-time-player {
position: absolute;
color: #ccc;
text-align: center;
left: 11.5em;
font-size: .3em;
width: auto;
min-width: 90px;
}
.video-time-player>* {
display: inline-block;
}
.volume {
position: relative;
cursor: pointer;
width: 80px;
height: 10px;
right: -5em;
top: 17px;
}
.volumeBar {
display: block;
height: 30%;
position: absolute;
background-color: #a4c9ec;
z-index: 10;
}
.sound,
.btnFS {
border: none;
}
.sound::after {
content: "";
background-image: url(http://svgshare.com/i/3v6.svg);
width: 45px;
height: 40px;
display: table-cell;
background-size: cover;
position: absolute;
top: 4px;
left: 25.5em;
}
.btnFS::after {
content: "";
background-image: url(http://svgshare.com/i/3u5.svg);
width: 25px;
height: 25px;
right: 5px;
display: table-cell;
background-size: cover;
position: absolute;
top: 12px;
}
.speed {
display: none;
position: absolute;
max-height: 0;
transition: max-height 1s;
}
.speed:hover,
.btnSpd:hover .speed {
display: inline-table;
list-style: none;
max-height: 300px;
transition: max-height 1s;
top: -170px;
}
.cmp {
width: 30%
}
<!-- Container of the controls vidio players -->
<main class='content-video-player'>
<section class="cmp playbackComponent" style='display:inline-table'>
<button class="btnPlay btn" title="Play/Pause video"></button>
<button class="btnStop btn" title="Stop video"></button>
<button class="btnSpd btn">X
<ul class='speed'>
<li>x3.0</li>
<li>x2.5</li>
<li>x2.0</li>
<li>x1.5</li>
<li>x1.0</li>
<li>x0.5</li>
</ul>
</button>
</section>
<section class='cmp timeComponent' style='display:inline-table'>
<div id="seeker" class="seeker">
<div class="trackbar"></div>
<div id="progressbar" class="progressbar" style="width: 114.7px;">
<span class="bufferBar"></span>
<span class="timeBar"></span>
</div>
<time class="video-time-player">
<b class="current">00:03</b> /
<b class="duration">00:03</b>
</time>
</div>
</section>
<section id='cmp ModComponent' style='display:inline-table'>
<div class="volume" title="Set volume">
<span class="volumeBar" style="width: 84.2857%;"></span>
</div>
<button class="btn sound sound2" title="Mute/Unmute sound"></button>
<button class="btn btnFS" title="Switch to full screen"></button>
</section>
</main>
Related
I want to put a line under a titlw with dots. like so: How can I do that? I am beginner at CSS. I tried to do it using before and after I could not achieve it though. Thanks in advance
This can help,
.text-wrapper {
max-width: 150px;
margin: 0 auto;
padding: 50px;
text-align: center;
}
.text-wrapper h2 {
margin: 0;
position: relative;
padding-bottom: 3px;
font-family: sans-serif;
}
.text-wrapper h2:after {
width: 50px;
content: '';
position: absolute;
left: 0;
height: 2px;
background: #adadad;
bottom: -4px;
left: 0;
}
.text-wrapper h2:before {
width: 50px;
content: '';
position: absolute;
height: 2px;
background: #adadad;
bottom: -4px;
right: 0;
}
.dots {
width: 4px;
height: 4px;
display: inline-block;
background: #ff9800;
border-radius: 100px;
position:relative;
margin: 0 2px;
}
.dots-wrapper {
display: inline-block;
width: 100%;
position: relative;
top: -10px;
}
<div class="text-wrapper">
<h2>Title</h2>
<div class="dots-wrapper">
<div class="dots"></div>
<div class="dots"></div>
<div class="dots"></div>
</div>
</div>
I have got the following code where when black segment overlap black points I want to change black points color to white and also when the rectangle when you hoover one of the points will change the color partially if overlaps the segment. I tried to do this with mix-blend-mode but no luck. What I was trying was to set a mix blend mode: difference to black segment and a isolation to the line. I tried a similar thing with the dosts.
https://jsfiddle.net/xm87keqh/9/
.month-subsection-news {
height: 62vh;
//background-color: blue;
position: relative;
}
.month-name-news {
font-size: 36vh;
position: absolute;
height: 100px;
width: 100px;
top: 5vh;
//margin-top: ;
font-family: GothamMedium;
color: #ededed;
}
.line-timeline {
width: 100%;
position: absolute;
height: 0.1vh;
top: 54%;
z-index: 3;
background-color: black;
// mix-blend-mode: exclusion;
}
.arrow-left-timeline {
position: absolute;
//#at-root: 2vh;
//width: 2vh;
left: 10vh;
top: 47%;
//background-color:blue
}
.arrow-right-timeline {
position: absolute;
//height: 2vh;
// width: 2vh;
right: 10vh;
top: 47%;
//background-color:blue
}
.dots {
position: absolute;
height: 1vh;
width: 1vh;
//left: 20vh;
top: -0.5vh;
background-color: black;
z-index: 999;
border-radius: 100px;
}
.dots1 {
left: 30vw;
}
.dots2 {
left: 50vw;
}
.dots3 {
left: 70vw;
}
.dots4 {
left: 60vw;
}
.dots5 {
left: 55vw;
}
// News cards
.news-card {
font-size: 30px;
width: 500px;
margin: 50px;
}
.top-photo-name {
border-top: 8.7px solid black;
//width: 75%;
}
.title-news-card {
margin: 40px 0px 20px 0px;
font-family: RobotoBold;
// width: 75%;
}
//End of news apge
.left-nav {
height: 100vh;
}
.news-page-api {
min-height: 100vh;
// height: 100vh;
//background-color: ;
}
.second-nav-news {
background-color: white !important;
border: 5px solid black;
top: 68.6px;
}
.column-icons-news {
width: fit-content;
border: 5px solid black;
}
.font-roboto-medium {
font-family: robotoMedium;
}
.number-of-news {
font-size: 311px;
top: 20vh;
font-family: robotoMEdium;
}
.margin-article {
margin-top: 10vh;
}
.news-title-in {
font-size: 59px;
font-family: RobotoBold;
}
.news-article-in {
font-size: 29px;
font-family: RobotoLight;
width: 80%;
}
.z-index {
z-index: 9999;
}
// .date-news{
// width: 75%;
// }
.img-news img {
width: 375px;
}
// .img-news{
// width: 75%;
// }
.news-card {
width: 375px;
}
.news-cards-section {
margin-top: 10vh;
}
// .news-page-section{ overflow-x: scroll;
// }
.dots5 a span {
display: none;
position: absolute;
color: #fff;
background: #000;
padding: 48px;
height: 11vh;
width: 40vh;
left: -30vh;
}
.dots5 a {
position: relative;
}
.hover-me:hover span {
display: block;
text-align: center;
clip-path: polygon(50% 0, 100% 41%, 100% 100%, 0 100%, 0 43%);
}
.black-segment {
height: 7vh;
width: 30vh;
position: absolute;
top: -1.5vh;
left: 80vh;
background-color: black;
}
<div class="month-subsection-news">
<div class="line-timeline">
<div class="black-segment"></div>
<div class="dots dots1"></div>
<div class="dots dots2"></div>
<div class="dots dots3"></div>
<div class="dots dots4"></div>
<div class="dots dots5"> <a class="hover-me" href="#"> a<span >Hello, World!</span></a></div>
</div>
Desired result
mix-blend-mode doesn't works well with black.
Instead you should prefer to use white as the default color, and then apply an invert filter over the whole result.
This also means that you have to manually invert all the defined colors inside the container element.
And the easiest is probably to make your rectangle the mixing element, however, for it to not mix with the horizontal line, you'd need a new wrapper that will define the isolation.
Here is a simplified example:
.line-timeline {
width: 100%;
position: absolute;
height: 5px;
top: 50px;
z-index: 3;
background-color: black;
}
.isolator {
isolation: isolate;
filter: invert(100%);
}
.dot {
width: 10px;
height: 10px;
background: white;
border-radius: 50%;
position: absolute;
top: -2.5px;
}
.dot.in {
left: 50px;
}
.dot.out {
left: 175px;
}
.dots5 a span {
position: absolute;
color: #000;
background: white;
padding: 48px;
height: 50px;
width: 150px;
display: block;
text-align: center;
clip-path: polygon(50% 0, 100% 41%, 100% 100%, 0 100%, 0 43%);
}
.dots5 a {
position: relative;
}
.black-segment {
height: 60px;
width: 150px;
position: absolute;
top: -15px;
background-color: white;
pointer-events: none;
mix-blend-mode: difference;
z-index: 10;
}
<div class="line-timeline">
<div class="isolator">
<!-- we use an isolator to not let our black rectangle mix with the horizontal line -->
<div class="black-segment"></div>
<div class="dot in"></div>
<div class="dot out"></div>
<div class="dots dots5"> <a class="hover-me" href="#"> a<span >Hello, World!</span></a></div>
</div>
</div>
I just fooled around with HTML/CSS to build me a page with a youtube-video with a button on top of it.
* { box-sizing: border-box; }
.video-background {
background: #000;
position: fixed;
top: 0; right: 0; bottom: 0; left: 0;
z-index: -99;
}
.video-background iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
html, body {
height: 100%;
margin: 0;
}
body {
display: flex;
justify-content: center;
align-items: center;
}
.btn-wrapper {
width: 290px;
height: 110px;
position: relative;
margin: 40px auto 0;
}
.btn-wrapper:hover .btn-inner {
top: -4px;
transform: scale(1, 1);
cursor: pointer;
}
.btn-wrapper__container {
border-bottom: 2px solid #15b5e2;
position: absolute;
width: 100%;
height: 80px;
}
.btn-wrapper__container:before, .btn-wrapper__container:after {
border-bottom: 2px solid #15b5e2;
width: 96%;
left: 2%;
bottom: -8px;
content: "";
position: absolute;
}
.btn-wrapper__container:after {
width: 92%;
left: 4%;
bottom: -14px;
}
.btn-wrapper__container .btn-inner {
width: 104.2%;
height: 100%;
position: absolute;
top: 20px;
left: -2.1%;
border: 2px solid #15b5e2;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Source Code Pro', monospace;
letter-spacing: 1px;
text-transform: uppercase;
font-size: 18px;
background: #10131c;
transform: scale(0.96, 0.96);
transition: all 0.3s;
z-index: 4;
}
.btn-wrapper__container .btn-inner__text {
text-decoration: none;
color: #15b5e2;
}
<div class="video-background">
<iframe src="https://www.youtube.com/embed/TMzouTzim0o?controls=1&showinfo=0&rel=0&autoplay=1&loop=1&playlist=W0LHTWG-UmQ" frameborder="0" allowfullscreen></iframe>
</div>
<div class="btn-wrapper">
<div class="btn-wrapper__container">
<div class="btn-inner">
<a class="btn-inner__text" href="#">Hover Me</a>
</div>
</div>
</div>
While without the button added, the video is shown in background, responsive and fullscreen, with control-elements enabled. If i add the hover-button, I am no longer able to control the video in background (360 video).
How can I enable the controls of the video and still have the button usable?
I am unfortunately not a coding expert, I've puzzled these pieces together of code I found in tutorials.
Remove css property z-index: -99 from class .video-background {...}, that will fix the issue.
* {
box-sizing: border-box;
}
.video-background {
background: #000;
position: fixed;
top: 0; right: 0; bottom: 0; left: 0;
/* z-index: -99; */ /* Remove this line */
}
.video-background iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
html,
body {
height: 100%;
margin: 0;
}
body {
display: flex;
justify-content: center;
align-items: center;
}
.btn-wrapper {
width: 290px;
height: 110px;
position: relative;
margin: 40px auto 0;
}
.btn-wrapper:hover .btn-inner {
top: -4px;
transform: scale(1, 1);
cursor: pointer;
}
.btn-wrapper__container {
border-bottom: 2px solid #15b5e2;
position: absolute;
width: 100%;
height: 80px;
}
.btn-wrapper__container:before,
.btn-wrapper__container:after {
border-bottom: 2px solid #15b5e2;
width: 96%;
left: 2%;
bottom: -8px;
content: "";
position: absolute;
}
.btn-wrapper__container:after {
width: 92%;
left: 4%;
bottom: -14px;
}
.btn-wrapper__container .btn-inner {
width: 104.2%;
height: 100%;
position: absolute;
top: 20px;
left: -2.1%;
border: 2px solid #15b5e2;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
font-family: 'Source Code Pro', monospace;
letter-spacing: 1px;
text-transform: uppercase;
font-size: 18px;
background: #10131c;
transform: scale(0.96, 0.96);
transition: all 0.3s;
z-index: 4;
}
.btn-wrapper__container .btn-inner__text {
text-decoration: none;
color: #15b5e2;
}
<div class="video-background">
<iframe src="https://www.youtube.com/embed/TMzouTzim0o?controls=1&showinfo=0&rel=0&autoplay=1&loop=1&playlist=W0LHTWG-UmQ"
frameborder="0" allowfullscreen></iframe>
</div>
<div class="btn-wrapper">
<div class="btn-wrapper__container">
<div class="btn-inner">
<a class="btn-inner__text" href="#">Hover Me</a>
</div>
</div>
</div>
This is my timeline code this far, I would like to end the last timeline-post element in a yellow line and then to the last blue dot.
I have tried to add this class .timeline:last-child::after but this does obliviously not work!
.iconspace {
position: relative;
width: 40px;
height: 40px;
text-align: center;
margin: 0 auto;
border-radius: 50%;
background-color: #25b5f1;
z-index: 7;
}
.iconspace i {
font-size: 18px;
color: #FFFFFF;
line-height: 40px;
}
.timeline {
position: relative;
}
.timeline:before {
content: "";
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 49.8%;
width: 3px;
height: 100%;
background-color: RED;
z-index: -5;
}
.timeline-post {
height: 100px;
width: 200px;
background-color: green;
margin: 0 auto;
margin-top: 20px;
}
.timeline:last-child::after {
content: "";
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 49.8%;
width: 3px;
height: 100%;
background-color: YELLOW;
z-index: -5;
}
.timeline:after {
position: absolute;
content: "";
display: inline-block;
width: 15px;
height: 15px;
line-height: 1;
background-color: #25b5f1;
margin-top: 50px;
left: 49.8%;
border-radius: 50%;
text-align: center;
}
<h3 class="entry-title" style="text-align: center;">EDUCATION</h3><span class="border"></span>
<div class="timeline">
<div class="iconspace"><i class="fa fa-graduation-cap"></i></div>
<div class="timeline-post">
Test 1
</div>
<div class="timeline-post">
Test 2
</div>
<div class="timeline-post">
Test 3
</div>
</div>
You need to apply last-child to timeline-post and not timeline. You need also to set negative value in bottom instead of using height:100% or your line will take the same height of the timeline-post and will never reach the blue dot.
Also never forget to add position:relative to element when using position:absolute with its pseudo-element or any child element.
.iconspace {
position: relative;
width: 40px;
height: 40px;
text-align: center;
margin: 0 auto;
border-radius: 50%;
background-color: #25b5f1;
z-index: 7;
}
.iconspace i {
font-size: 18px;
color: #FFFFFF;
line-height: 40px;
}
.timeline {
position: relative;
}
.timeline:before {
content: "";
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 49.8%;
width: 3px;
height: 100%;
background-color: RED;
z-index: -5;
}
.timeline-post {
height: 100px;
width: 200px;
background-color: green;
margin: 0 auto;
margin-top: 20px;
}
.timeline:after {
position: absolute;
content: "";
display: inline-block;
width: 15px;
height: 15px;
line-height: 1;
background-color: #25b5f1;
margin-top: 50px;
left: 49.8%;
border-radius: 50%;
text-align: center;
}
.timeline .timeline-post {
position: relative;
}
.timeline .timeline-post:last-child::after {
content: "";
display: block;
position: absolute;
top: 0;
bottom: -50px;
left: 49.8%;
width: 3px;
background-color: YELLOW;
z-index: -5;
}
<h3 class="entry-title" style="text-align: center;">EDUCATION</h3><span class="border"></span>
<div class="timeline">
<div class="iconspace"><i class="fa fa-graduation-cap"></i></div>
<div class="timeline-post">
Test 1
</div>
<div class="timeline-post">
Test 2
</div>
<div class="timeline-post">
Test 3
</div>
</div>
I am trying to figure out how to place the logo in the middle of the two sections of my landing page but only on the mobile view. The text class is for my logo. I cant seem to figure out the best way to do so.
.text {
position: absolute;
right: 70px;
left: 70px;
text-align: center;
z-index: 10;
margin: auto;
max-width: 600px;
}
Here is the codepen: http://codepen.io/anon/pen/xqQPVN?editors=1100
Just give it position:absolute and set it accordingly for mobile devies..
Added the following css in the case of mobile.
/* Logo In Center For Mobile Device*/
.logo-big {
display: block;
width: 100%;
position: absolute;
top: 500px;
margin-top: -75px;
}
Codepen link-http://codepen.io/sahildhir_1/pen/wJQxQy?editors=1100
Below is the snippet-
* {
box-sizing: border-box;
}
html,
body {
height: 100%
}
img {
max-width: 100%;
}
.item {
width: 50%;
float: left;
top: 0;
left: 0;
height: 100%;
z-index: 0;
overflow: hidden;
background-color: #000000;
background-position: center center;
background-size: auto 100%;
position: relative;
}
.overlay {
width: 100%;
height: 100%;
position: absolute;
background-color: rgba(0, 0, 0, 0.3);
transition: .2s linear;
}
.nurseryarea {
width: 100%;
position: absolute;
text-align: center;
top: 45%;
color: #fff;
font-size: 30px;
font-family: 'times new roman';
font-weight: bold;
transition: .2s linear;
}
::selection {
color: #ebebe3;
background: #222;
}
::-moz-selection {
color: #ebebe3;
background: #222;
}
.overlay:hover {
background-color: rgba(0, 0, 0, 0.1);
transition-property: background-color;
}
.overlay:hover .nurseryarea {
opacity: 1;
transition-property: opacity;
}
.logo-big {
display: block;
width: 100%;
}
.logo-big .svg {
display: block;
width: 100%;
height: auto;
}
.imgsize {
width: 40%;
}
.text {
position: absolute;
right: 70px;
left: 70px;
text-align: center;
z-index: 10;
margin: auto;
max-width: 600px;
}
#media screen and (max-width:600px) {
.nurseryarea {
width: 100%;
}
.imgsize {
width: 60%;
}
.text {
position: absolute;
right: 70px;
left: 70px;
text-align: center;
z-index: 10;
margin: auto;
max-width: 600px;
}
/* Logo In Center For Mobile Device*/
.logo-big {
display: block;
width: 100%;
position: absolute;
top: 500px;
margin-top: -75px;
}
.logo-big .svg {
display: block;
width: 100%;
height: auto;
}
.item {
width: 100%;
float: left;
top: 0;
left: 0;
height: 500px;
z-index: 0;
overflow: hidden;
background-color: #000000;
background-position: center center;
background-size: auto 100%;
}
}
<div class="text">
<a class="logo logo-big" href="http://www.lygonstnursery.com">
<img class="svg " src="https://www.lygonstnursery.com/wp-content/uploads/2017/03/NURSERY-landing-page.png" alt="Lygon Street Nursery">
</a>
</div>
<div class="item" style="background-image: url(https://www.lygonstnursery.com/wp-content/uploads/2017/02/LygonStNursery_Nursery-29.jpg);background-size:cover;">
<div class="overlay">
<div class="nurseryarea">
<img class='imgsize' src="https://www.lygonstnursery.com/wp-content/uploads/2017/03/nursery.png" ;>
</div>
</div>
</div>
<div class="item" style="background-image: url(https://www.lygonstnursery.com/wp-content/uploads/2017/02/LygonStNursery_Brunswick-24.jpg); background-size:cover;">
<div class="overlay">
<div class="nurseryarea">
<img class="imgsize" src="https://www.lygonstnursery.com/wp-content/uploads/2017/03/landscapes.png" ;>
</div>
</div>
</div>
If you want to have total control over the positioning i'd say go for progressively specific media queries (say: 425px, 375px, 320px) and use pixel positioning.
If you want to keep it generic, you must be prepared to have some small differences between these sizes, but you can use percentages and the result isn't so bad.
#media (max-width: 425px) {
.text {
position: absolute;
right: 34%;
left: 32%;
top: 34%;
}
}