Scroll getting under the fixed element? - html

This is what I have issuse, I have this one:
CSS
.contentbox img {
max-width:100% !important;
height:auto;
display:block;
padding-top:100px;
}
.viewer-v3.lightbox {
padding-top:2%;
overflow: auto;
display: block;
position: fixed;
z-index: 9999;
width: 100%;
height: 100%;
overflow: hidden;
text-align: center;
top: 0;
left: 0;
background: black;
background: rgba(0,0,0,0.8);
}
.contentbox {
height: 100%;
overflow: auto;
width:100%;
float:left;
}
.borderLightbox
{
border:#cccccc;
border-width:2%;
border-top-style:none;
border-right-style:solid;
border-bottom-style :solid;
border-left-style:solid;
position:relative;
/*
Here edit widht of lightBox
*/
width: 40%;
/*
#end
*/
height: 93%;
background-color:#e5e5e5;
margin-left:auto;
margin-right:auto;
overflow: visible;
}
.headerLightbox
{
position:fixed;
background-color:#e5e5e5;
border:#cccccc;
border-width:1%;
width: inherit;
float:left;
border-top-style:solid;
border-right-style:none;
border-bottom-style :none;
border-left-style:none;
}
.actionsLightbox
{
background-color:#ffffff;
width:96%;
float:left;
padding-top:5px;;
padding-bottom:5px;
padding-left:2%;
padding-right:2%;
}
.titleLightbox
{
color:#27aae4;
width:96%;
float:left;
padding-top:5px;
padding-bottom:5px;
padding-left:2%;
padding-right:2%;
}
.titleLinkLightbox
{
float:left;
}
.filetypeLightbox
{
float:left;
width:100%;
text-align:left;
color:#a5a5a5;
}
.closeLightbox
{
float:right;
text-decoration:none;
display:block;
background-image:url(lightboxIcons.png);
background-position: 318px 0;
background-size: cover;
height:24px;
width:24px;
}
.printLightbox
{
float:left;
text-decoration:none;
display:block;
background-image:url(lightboxIcons.png);
background-position: 0px 0;
background-size: cover;
height:24px;
width:24px;
}
.zoomLightbox
{
float:right;
text-decoration:none;
display:block;
background-image:url(lightboxIcons.png);
background-position: 61px 0;
background-size: cover;
height:24px;
width:26px;
}
.actionsPageLightbox
{
float:left;
margin-left:auto;
margin-right:auto;
width:50%;
border:#cccccc;
border-width:1px;
border-top-style:none;
border-right-style:solid;
border-bottom-style :none;
border-left-style:solid;
margin-left:10%;
padding-left:2%;
pading-right
}
.prevLightbox
{
float:left;
text-decoration:none;
display:block;
background-image:url(lightboxIcons.png);
background-position: 245px 0;
background-size: cover;
height:24px;
width:24px;
}
.nextLightbox
{
float:left;
text-decoration:none;
display:block;
background-image:url(lightboxIcons.png);
background-position: 198px 0;
background-size: cover;
height:24px;
width:24px;
}
.minusLightbox
{
float:left;
text-decoration:none;
display:block;
background-image:url(lightboxIcons.png);
background-position: 160px 0;
background-size: cover;
height:24px;
width:24px;
}
.plusLightbox
{
float:left;
text-decoration:none;
display:block;
background-image:url(lightboxIcons.png);
background-position: 112px 0;
background-size: cover;
height:24px;
width:24px;
}
.inputLightbox
{
float:left;
width:5%;
}
.currentPageLightbox
{
float:left;
}
and here is HTML
<div class="viewer-v3 lightbox">
<div class="borderLightbox">
<div class="headerLightbox">
<div class="titleLightbox">
<span class="titleLinkLightbox">
FileDeleteImeg.jpg
</span>
<a class="closeLightbox" href="#"></a>
<span class="filetypeLightbox">Adobe Views file</span>
</div>
<div class="actionsLightbox">
<a class="printLightbox" href="#"></a>
<div class="actionsPageLightbox">
<a class="prevLightbox" href="#"></a>
<input type="text" name="LastName" class="inputLightbox">
<span class="currentPageLightbox">/ 12</span>
<a class="nextLightbox" href="#"></a>
<a class="minusLightbox" href="#"></a>
<a class="plusLightbox" href="#"></a>
</div>
<a class="zoomLightbox" href="#"></a>
</div>
</div>
<div class="contentbox">
<img src="http://fc08.deviantart.net/fs51/f/2009/281/e/2/Paint_Tool_SAI_tutorial_IS_BIG_by_Left_Right_Wrong.png">
</div>
</div>
</div>
This is mine problem, i have scroll on the image and working ok, but the scrool is getting under header element that is fixed, even to prevenet that i have addded margines to picture to be under header, mine question is how to put scroll bas under the fixed header, does anyone have solution?
here is a fiddle, abaout mine problem, you see scrool bar is going under the fixed header, any solution?
http://jsfiddle.net/Fmh5p/

You can change the value of padding-top on the image to the border-top on contentbox, to make it work with the scroll use this:
.contentbox {
border-top:100px solid transparent;
box-sizing:border-box;
}
Check this Demo Fiddle
Note : The property box-sizing helps to keep the real 100% height of the container, note that this property only works on IE>=8

Related

Keep objects centered in place without moving

I'm trying to keep things centered in the browser without it stretching my divs and moving my videos..
when I stretch my browser it moves my images and objects around..
I want to keep objects inside the divs & have everything stay in place..
Is that possible using just css or do I have to use flexbox and java?
I've posted a image on whats going on and here is the coding for it all..
I'm sure it needs a little code cleaning..
body {
background-image: url("http://lorempixel.com/500/800/nature/3");
background-color: #ffffff;
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
height:600px;
width: 100%;
font-size: 20px;
margin: 0px;
padding: 0px;
background-attachment:fixed;
z-index: 9999px;
}
main {
background: #333333;
width:90%;
height:660px;
margin: 300px 0px 0px 100px;
padding: 10px;
z-index: 1;
}
.divl {
background: url("http://lorempixel.com/500/800/nature/3") top center no-repeat, rgba(0,0,0,.3);
background-attachment: fixed;
background-size: cover;
opacity: 0.6;
filter: alpha(opacity=30); /* For IE8 and earlier */
float:left;
text-align:left;
width: 20%;
height: 96%;
margin:0px;
padding: 10px 20px;
border: 2px solid black;
border-radius: 5px;
}
.divr {
background: url("http://lorempixel.com/500/800/nature/3") top center no-repeat, rgba(0,0,0,.3);
background-attachment: fixed;
background-size: cover;
opacity: 0.6;
filter: alpha(opacity=30); /* For IE8 and earlier */
float:right;
text-align:right;
width: 20%;
height: 96%;
margin:0px;
padding: 10px 20px;
border: 2px solid black;
border-radius: 5px;
}
.divc {
background: url("http://lorempixel.com/500/800/nature/3") top center no-repeat, rgba(0,0,0,.3);
background-attachment: fixed;
background-size: cover;
opacity: 0.6;
filter: alpha(opacity=30); /* For IE8 and earlier */
text-align:center;
text-align:center;
width: 50%;
vertical-align: middle;
height: 96%;
margin:auto;
padding: 10px;
border: 2px solid black;
border-radius: 5px;
}
.mnu { overflow:hidden; background-color:#F8F8F8; padding:2px; line-height:1.5em; cursor:pointer; }
.mnu a { display:block; cursor:pointer; width:100%; padding:0 2px 0 1px; margin:0; }
.mnu a:link { color:#000000; text-decoration:none; }
.mnu a:visited { color:#000000; text-decoration:none; }
.mnu a:hover { color:#000000; text-decoration:none; background-color:#F0F0F0; }
.mnu a:active { color:#000000; text-decoration:none; background-color:#EAEAEA; }
.fil { position:absolute; left:0; top:0; width:100%; height:100%; }
.ptr { cursor:pointer; }
.opr { filter:alpha(opacity=100); }
.trn { opacity:0; filter:alpha(opacity=0); }
.smf { -ms-interpolation-mode:bicubic; }
.sol { background-color:blue; }
.bmk { border-style:dashed; border-width:0 0 1px 0; }
.ctr { position:relative; margin-left:auto; margin-right:auto; text-align:left; }
.ctt { text-align:center; }
.abs { position:absolute; }
.aut { overflow:auto; }
.hid { overflow:hidden; }
.scr { overflow:scroll; }
.vis { overflow:visible; }
.inv { visibility:hidden; }
.cms { }
.col { background-color:transparent; clear:left; float:left; }
.cor { background-color:transparent; clear:right; float:right; }
.required { }
.nvo { }
.bgremove { background-image:none; }
.nml { }
.hd1,h1 { font-family:Times New Roman, Times, serif; font-style:italic; font-size:18px; text-align:center; }
.hd2,h2 { font-family:Times New Roman, Times, serif; font-style:italic; font-size:15px; }
.hd3,h3 { font-weight:bold; }
.mnus { padding:0px; border-width:2px; border-style:outset; background-color:#CEE5F2; text-align:center; }
.mnus a:hover { color:#FFFFFF; background-color:#000080; }
.mnus a:active { color:#FFFFFF; background-color:#0000CC; }
.pnl { border-width:1px; border-style:solid; border-color:#8DC7EB; background-color:#CEE5F2; }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="created" content="Tue, 19 Feb 2019 02:15:52 GMT">
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" href="style.css">
<title></title>
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<main>
<div class="divl">Music<br> Here Is A List Of Music</div>
<div class="divr">Producers<br> Here Is A List Of Producers</div>
<div class="divc">Videos<br><div id="lays581qvlpb">
<div id="pict581wjphg" class="hid abs" style="left:1199px; top:300px; width:100px; height:100px;"
onclick="document.getElementById('lays585jmqnb').style.visibility='visible';
document.getElementById('lays585mobib').style.visibility='hidden';
document.getElementById('lays585cwgno').style.visibility='hidden';
document.getElementById('lays585tvnws').style.visibility='hidden';">
<img id="pict581wjphgi" class="fil smf" src="img-1.png" alt="">
</div>
<div id="pict581nqvmq" class="hid abs" style="left:1199px; top:399px; width:100px; height:100px;"
onclick="document.getElementById('lays585jmqnb').style.visibility='hidden';
document.getElementById('lays585mobib').style.visibility='visible';
document.getElementById('lays585cwgno').style.visibility='hidden';
document.getElementById('lays585tvnws').style.visibility='hidden';">
<img id="pict581nqvmqi" class="fil smf" src="img-2.png" alt="">
</div>
<div id="pict583yfwki" class="hid abs" style="left:1199px; top:498px; width:100px; height:100px;"
onclick="document.getElementById('lays585jmqnb').style.visibility='hidden';
document.getElementById('lays585mobib').style.visibility='hidden';
document.getElementById('lays585cwgno').style.visibility='visible';
document.getElementById('lays585tvnws').style.visibility='hidden';">
<img id="pict583yfwkii" class="fil smf" src="img-1.png" alt="">
</div>
<div id="pict583fdwaz" class="hid abs" style="left:1199px; top:597px; width:100px; height:100px;"
onclick="document.getElementById('lays585jmqnb').style.visibility='hidden';
document.getElementById('lays585mobib').style.visibility='hidden';
document.getElementById('lays585cwgno').style.visibility='hidden';
document.getElementById('lays585tvnws').style.visibility='visible';">
<img id="pict583fdwazi" class="fil smf" src="img-2.png" alt="">
</div>
</div>
<div id="lays585jmqnb">
<div id="ytub586qorjf" class="hid abs" style="left:600px; top:300px; width:600px; height:397px; border-width:1px;
border-style:solid; border-color:#808080;" border="0">
<iframe style="width:100%; height:100%" src="http://www.youtube.com/embed/Lzkbf9wrMcQ?hd=1
" frameborder="0" allowfullscreen></iframe></div>
</div>
<div id="lays585mobib" style="visibility:hidden">
<div id="ytub586vzlff" class="hid abs" style="left:600px; top:300px; width:600px; height:397px; border-width:1px;
border-style:solid; border-color:#808080;" border="0">
<iframe style="width:100%; height:100%" src="http://www.youtube.com/embed/9SI2xE0ixws?hd=1
" frameborder="0" allowfullscreen></iframe></div>
</div>
<div id="lays585cwgno" style="visibility:hidden">
<div id="ytub587seayk" class="hid abs" style="left:600px; top:300px; width:600px; height:397px; border-width:1px;
border-style:solid; border-color:#808080;" border="0">
<iframe style="width:100%; height:100%" src="http://www.youtube.com/embed/U5LgnJI1FfI?hd=1
" frameborder="0" allowfullscreen></iframe></div>
</div>
<div id="lays585tvnws" style="visibility:hidden">
<div id="ytub587wsjnq" class="hid abs" style="left:600px; top:300px; width:600px; height:397px; border-width:1px;
border-style:solid; border-color:#808080;" border="0">
<iframe style="width:100%; height:100%" src="http://www.youtube.com/embed/C9jH6mK_wUg?hd=1
" frameborder="0" allowfullscreen></iframe></div>
</div></div>
</main>
<div style="clear:both;"></div>
</div>[![enter image description here][1]][1]
</body>
</html>

I am making a website for a school project and I am having problems with different resolutions positioning elements of the site

As mentioned in the title I am making a website for school, and part way through creating it I discovered that when I displayed the page on a screen with a different resolution that the elements on my site do not line up correctly. I am fairly new to html/css and am stuck at how to fix this. Any advice or help would be greatly appreciated.
This is the body section of my html file:
<a href='index.html'>
<img src="Images\Logo\Logopng.png" alt="Explore Germany"/>
</a> <!-- Inserting Logo at top of page -->
<div id="whitespace">
<a> <img id="twitt" src="Images\images\twitter_web.png"> </a>
<a> <img id="email" src="Images\images\email_web.png"> </a>
</div>
<nav>
<div id="top" class = "line black"></div> <!-- This is the black line just above the links at top of page -->
<ul> <!-- A list with links to external pages for my header -->
<li><a id="menu" href="why.html">Why Germany?</a></li>
<li><a id="menu" href="where.html">Where In Germany?</a></li>
<li><a id="menu" href="language.html">German Language</a></li>
<li><div class="box grey"></div></li>
</ul>
<div id="bottom" class = "line black"></div> <!-- This is the black line just below the links at top of page -->
</nav>
</header>
<img id="map" src="Images\images\Map.png">
<img class="Icon" id="Hamburg" src="Images\images\Icon.png"> <div id="Hamburg_Name">Hamburg</div>
<img class="Icon" id="Berlin" src="Images\images\Icon.png"> <div id="Berlin_Name">Berlin</div>
<img class="Icon" id="Dresden" src="Images\images\Icon.png"> <div id="Dresden_Name">Dresden</div>
<img class="Icon" id="Dusseldorf" src="Images\images\Icon.png"> <div id="Dusseldorf_Name">Dusseldorf</div>
<img class="Icon" id="Cologne" src="Images\images\Icon.png"> <div id="Cologne_Name">Cologne</div>
<img class="Icon" id="Frankfurt" src="Images\images\Icon.png"> <div id="Frankfurt_Name">Frankfurt</div>
<img class="Icon" id="Munich" src="Images\images\Icon.png"> <div id="Munich_Name">Munich</div>
<div id="info">
<div id="name">Click on an Icon on the<br> map to learn more about that city</div>
<div id="info1"></div>
<img src="" id="cityImg">
<div id="head"></div>
<div id="info2"></div>
</div>
<div id="foot" class="footer black"> <!-- This is for the black box at the bottom which is the footer -->
<nav>
<ul>
<li><a id="wfooter" href="index.html">Home</a></li> <!-- This is a list of the links and lines in the footer -->
<li><a id="wfooter" href="why.html">Why Germany</a></li>
<li><a id="wfooter" href="where.html">Where In Germany</a></li>
<li><a id="wfooter" href="language.html">German Language</a></li>
<li><a id="wfooter2"><i>#Copyright Jack Ryan 2017 Contact: jryan#student.christscollege.com<i></a></li>
</ul>
</nav>
</div>
</body>
And this is my css file:
body {
width: 800px;
height:1200px;
margin:0 auto;
vertical-align: middle;
height:100%;
}
p {
font-size: 15%
font:;
}
header img {
vertical-align: middle;
margin-left: 350px;
margin-top:15px;
max-height: 100px;
max-width:100px;
}
#gate {
max-width: 800px;
margin-left: 0px;
position:relative;
bottom:16px;
}
html {
width:100%;
height:100%;
background-color:black;
}
ul {
list-style-type:none;
margin-left:-40px;
padding: none;
overflow: hidden;
}
#menu {
margin-left:93px;
max-width: 800px;
float:left;
display: block;
padding:12px;
background-color:#dddddd;
text-align: center;
text-decoration: none;
font-family: "Proxima Nova";
color:black;
margin-top:0px;
}
#menu:hover {
background-color: #cccccc;
}
.box {
width:800px;
height: 40px;
}
.grey {
background:#dddddd;
}
.line {
width:800px;
height:2px;
}
.black {
background:#000000;
}
#top {
position:relative;
bottom:-18px;
}
#bottom {
position:relative;
bottom:16px;
}
.back {
width:800px;
height:1225px;
}
.backwhere {
width:800px;
height:935px;
}
.darkgrey {
background:#fefdfd;
}
.side {
position:absolute;
width:10px;
height:10px;
}
.footer {
width:775px;
height:150px;
margin-left:12.5px;
border-radius:12.5px;
}
#body {
width:775px;
margin-left:12.5px;
}
#footer {
display: block;
text-decoration:none;
font-family:"Proxima Nova";
position:relative;
padding:5px;
top:10px;
color:white;
margin-left:5px;
}
#footer2 {
display: block;
text-decoration:none;
font-family:"Proxima Nova";
position:relative;
color:white;
margin-left:15px;
margin-top:20px;
}
#footer:hover {
color:lightgray;
}
#twitt {
position:relative;
margin-left:750px;
top:-125px;
}
#email {
position:relative;
margin-left:695px;
top:-186px;
}
#whitespace {
height:0px;
}
#map {
position:absolute;
left: 270px;
margin-left:0px;
max-height:85%;
max-width:85%;
}
#hamburg {
position:absolute;
top:280px;
left:480px;
}
#hamburg_name {
position:absolute;
top:280px;
left:500px;
font-family:"Proxima Nova";
}
#Berlin {
position:absolute;
top:350px;
left:620px;
}
#Berlin_Name {
position:absolute;
top:350px;
left:640px;
font-family:"Proxima Nova";
}
#Dresden {
position:absolute;
top:425px;
left:640px;
}
#Dresden_name {
position:absolute;
top:425px;
left:660px;
font-family:"Proxima Nova";
}
#Dusseldorf {
position:absolute;
top:435px;
left:360px;
}
#Dusseldorf_name {
position:absolute;
top:435px;
left:380px;
font-family:"Proxima Nova";
}
#Cologne {
position:absolute;
top:460px;
left:380px;
}
#Cologne_name {
position:absolute;
top:460px;
left:400px;
font-family:"Proxima Nova";
}
#Frankfurt {
position:absolute;
top:510px;
left:455px;
}
#Frankfurt_name {
position:absolute;
top:510px;
left:475px;
font-family:"Proxima Nova";
}
#Munich {
position:absolute;
top:620px;
left:550px;
}
#Munich_name {
position:absolute;
top:620px;
left:570px;
font-family:"Proxima Nova";
}
.Icon{
height: 20px;
width: 20px;
}
#info{
position: absolute;
top: 200px;
left: 730px;
background-color: #e6e6e6;
height: 550px;
width: 325px;
border-radius:12.5px;
}
#Name {
font-family:"Proxima Nova";
font-size:25px;
position: absolute;
left:20px;
top:10px;
}
#info1 {
font-family:"Proxima Nova";
font-size:15px;
position:absolute;
left:15px;
top:40px;
}
#info2 {
font-family:"Proxima Nova";
font-size:15px;
position:absolute;
left:15px;
top:320px;
}
#cityImg {
position:absolute;
top:120px;
left:15px;
max-width:300px;
max-height:200px;
}
#head {
font-family:"Proxima Nova";
font-size:25px;
position:absolute;
left:15px;
top:290px;
}
#foot {
position:absolute;
top:760px;
}
#wfooter {
display: block;
text-decoration:none;
font-family:"Proxima Nova";
position:relative;
padding:5px;
top:-5px;
color:white;
margin-left:5px;
}
#wfooter2 {
display: block;
text-decoration:none;
font-family:"Proxima Nova";
position:relative;
color:white;
margin-left:15px;
margin-top:20px;
top:-10px;
}
h1 {
font-family: "Proxima Nova";
color:black;
position:absolute;
font-weight:lighter;
top:175px;
left:300px;
z-index:1;
}
h2 {
font-family: "Proxima Nova";
font-style:normal;
color:black;
font-weight:lighter;
font-size:16px;
position:absolute;
top:220px;
left:300px;
max-width:700px;
z-index:1;
}
#Central_Why {
border-radius:15px;
border:3px solid black;
max-width:775px;
position:absolute;
top:300px;
left:285px;
z-index:0;
border-color:black;
}
#Why_Body {
position:absolute;
font-family:"Proxima Nova";
left:285px;
top:630px;
font-weight:lighter;
}
#Oktoberfest {
position:absolute;
font-family:"Proxima Nova";
left:285px;
top:690px;
font-weight:lighter;
}
there are a few solutions. a simple one would be #media queries. these ask the browser what size it is and then give it different instructions depending on size
for example adding
#media screen and (min-width: 480px) {
body {
width: 600px;
height:1000px;
}
}
now your screen will load a different height and width depending on screen size. you can read more here: https://www.w3schools.com/cssref/css3_pr_mediaquery.asp
and here is a set of sizes to work to: https://css-tricks.com/snippets/css/media-queries-for-standard-devices/
there will always be differences on uses screens so you have to build anticipating that, so test it on lots by resizing your browser or if oyu get more into webdesign using a site like this: http://quirktools.com/screenfly/
also, i'm sorry about all the downvotes. the community here aren't really newbie friendly. its an amazing resource, but more where experienced (/semi experienced) developers come to support each other.. i guess that culture has developed so it doesn't become like a school for teaching basics.
speaking as someone who closed more than one account because my questions we not well received, i'd suggest googling for a forum or slack group specifically for people starting out to get advice and help, there are plenty of devs out there eager to help those just starting out

Play Store SearchBar variable width

If you go to Google Play Store Website,you will notice that the width of the SearchBar at the top changes if you change the window width.
Can someone please give me an example on how I can achieve such variable width behaviour using just HTML and CSS?
CSS
body {
margin:0;
min-width:960px;
}
#upperbar {
background-color:#F1F1F1;
white-space:nowrap;
height:60px;
width:100%;
}
#logobardiv {
margin:10px 20px 10px 30px;
display:inline-block;
}
#logo {
height:39px;
width:183px;
}
#searchbardiv {
font-size:0;
display:inline-block;
height:100%;
padding-left:10px;
vertical-align:middle;
white-space:nowrap;
min-width:200px;
}
#searchbar {
height:28px;
/*max-width:589px;*/
max-width:100%;
width:589px;
min-width:545px;
font-size:16px;
border:1px solid #A8A8A8;
border-right:none;
display:inline-block;
vertical-align:middle;
}
#searchbar:hover {
border:1px solid black;
border-right:none;
}
::-webkit-input-placeholder {
color:#A9A9A9;
padding:0 0 0 7px;
}
#searchbutton {
vertical-align:middle;
background:#4584F0;
height:28px;
width:60px;
display:inline-block;
border:1px solid transparent;
border-top-right-radius:2px;
border-bottom-right-radius:2px;
padding:0;
margin:0;
outline:none;
white-space:nowrap;
}
#searchbuttonimg {
vertical-align:middle;
background:url(images/search.png) no-repeat center;
display:inline-block;
height:100%;
width:26px;
}
#signindiv {
display:inline-block;
height:100%;
white-space:nowrap;
vertical-align:middle;
}
#appsimg {
display:inline-block;
vertical-align:middle;
}
HTML
<body>
<div class="container">
<div id="upperbar">
<div id="logobardiv">
<img id="logo" src="https://www.gstatic.com/android/market_images/web/play_logo_x2.png" />
</div>
<div id="searchbardiv">
<input id="searchbar" type="text" placeholder="Search" />
<button id="searchbutton"> <span id="searchbuttonimg"></span>
</button>
</div>
<div id="signindiv">
<img id="appsimg" src="images/apps.png" />
</div>
</div>
</div>
JSFiddle
simple way is you need to set a 3 different width max-width, min-widtht and actual width
like
input{
max-width:100%;
min-width:300px;
width:800px;
}
I used display:flex to achieve the variable length of the elements.
Refer the below link for a good explanation
FlexBox

Why dosn't my slider show up correct in firefox?

The slider at the top of my page does show up perfect in Chrome, but not in Firefox. How can I fix this problem?
I already uploaded a test of the page, in case you would like to have a look.
Test of page: http://www.s4ea.org/new/index.html
HTML:
<header class="header2">
<header class="second">
<div class="top_slider">
<div id="slider" class="aslider" data-duration="10" data-hide-controls>
<div class="aslide" data-duration="4" data-audio="assets/audio/Acoustic-Josh-10248_hifi.mp3" data-audio-loop>
<img src="https://lh6.googleusercontent.com/-kKIX7Bbp10U/UwlakWBTzII/AAAAAAAA1iU/FoYSNulL4Oo/s720/IMG_0003.JPG" />
</div>
<div class="aslide" data-duration="5" data-audio="assets/audio/Country_-Adrien_G-8614_hifi.mp3">
<img src="https://lh3.googleusercontent.com/-yRjbRGF3V5Q/UwlauwWKw-I/AAAAAAAA1jE/8EiHF1C5bvc/s720/IMG_0009.JPG" />
</div>
<div class="aslide" data-duration="6" data-audio="assets/audio/Driving_-SpoonZ-9705_hifi.mp3">
<img src="https://lh4.googleusercontent.com/-I0BvWvxsYos/Uwla55SXfeI/AAAAAAAA1j8/nH4M26dUtdw/s720/IMG_0016.JPG" />
</div>
<div class="aslide" data-duration="7" data-audio="assets/audio/I_Wouldn-duh-8326_hifi.mp3">
<img src="https://lh3.googleusercontent.com/-1OPZWOsQxTQ/UwlbHV7w9tI/AAAAAAAA1k0/FHocKwEtNuQ/s720/IMG_0023.JPG" />
</div>
</div>
</div>
<div class="logo">
<img src="http://www.s4ea.org/images/logor.jpg" width="100%" height="auto">
</div>
<div class="right">
<img src="http://www.s4ea.org/images/register3.jpg" height="100%" width="auto" />
</div>
</header>
</header>
CSS:
.ul {
width:50%;
list-style:none;
display:inline;
background-color:#FFF;
}
.ul li {
display: inline;
background-color:#FFF;
}
.second .top_slider {
width:40%;
background-color: #FFF;
float:left;
}
.second .top_slider .aslide {
display: none;
}
.second .top_slider .aslide img {
max-width: 100%;
height:auto;
}
.second .top_slider #slider {
width: 100%;
height: 600px;
}
.second .top_slider .aslide .text {
width: 200px;
margin: 0 auto;
color: #f8f8f8;
text-shadow: 0 0 2px #000;
font-weight: bold;
font-size: 36px;
width: 100%;
text-align: center;
position: absolute;
bottom: 30px;
font-family: sans-serif;
}
.second .logo {
width: 26.7%;
background-color: #FFF;
float:left;
padding-left:3.3%;
}
.second .right {
width:26.7%;
background-color: #FFF;
float:left;
overflow:hidden;
font-size:1em;
height:100%;
padding:0% 0% 0% 3.3%;
}
.second .right img {
margin:0px 0px 0px 0px;
width:100%;
height:auto;
}
.second .right ul li{
list-style:none;
line-height:0px;
margin:0px 0px 0px 0px;
padding:0px 0px 0px 0px;
}
.second .right ul {
list-style:none;
line-height:0px;
margin:0px 0px 0px 0px;
padding:0px 0px 0px 0px;
}
.second .right ul li img{
list-style:none;
line-height:0px;
margin:0px 0px 0px 0px;
padding:0px 0px 0px 0px;
height: 20%;
padding-top:5%;
width:auto;
}
A couple of issues
.second .top_slider .aslide img {
width: 100%;
height:auto;
}
.mainheader nav {
background-color: #FFFFFF;
float: left;
height: 10%;
width: 100%;
}
it seems the width of the images are not correct since you did not set a width and your nav just needed a float clear. I cleared it by making it a float but there are many other ways to do this

Variable height for multiple columns of div

I want to put 3 div like columns. The one on the left and the one the right have a content and variable length. The one in the middle is a divider.
My CSS is:
html
{
background:url(../img/texture.png) 50% 0 repeat #fff;
}
body
{
font:13px/20px "Trebuchet MS", Helvetica, sans-serif;
position:relative;
min-width:960px;
}
html, body
{
height:100%;
}
.main
{
background-color:#f8f8f8;
padding:2px;
border:1.5px solid #000000;
border-radius:1em;
-webkit-border-radius:1em;
-moz-border-radius:1em;
-o-border-radius:1em;
margin:auto;
width:950px;
box-shadow:0 0 20px #585858;
word-wrap:break-word;
}
section#content
{
padding:10px 0px;
overflow:hidden;
}
section#content #text
{
margin:10px 20px 0px;
text-align:center;
}
#text #login
{
width:40%;
margin-left:5%;
margin-right:5%;
float:left;
text-align:left;
}
#text #registration
{
width:40%;
margin-left:5%;
margin-right:5%;
float:right;
text-align:left;
}
#text #divider_ver
{
float:left;
height:100%;
width:1px;
background:#000000;
}
And my JSP:
<body>
<div class="main">
<section id="content">
<div id="testo">
<div id="text">
<div id="login">
...
</div>
<div id="divider_ver"></div>
<div id="registration">
...
</div>
</div>
</div>
<div class="clear"></div>
</section>
</div>
</body>
The problem is that the divider won't show up. If I set its height like: min-height:100px; it will, but will have fixed height (100px). I want it to have the height of the taller between the other 2 div, but I can't do it.
http://jsfiddle.net/2mjet/1/
Here:
CSS changes
section#content #text
{
margin:10px 20px 0px;
text-align:center;
overflow: hidden;
}
#text #divider_ver
{
float:left;
padding-bottom: 10000px;
margin-bottom: -10000px;
width:1px;
background:#000000;
}
Simple +padding -margin with overflow:hidden container, but it's nice trick to remember.