Why overflow:hidden is not working? - css

Overflow:hidden is not working for me. Gray box remains under the picture. I don't know whats wrong with it. I used this code from youtube tutorial.
If some one can help me, I will be very thankful.
.main
{
border: 10px solid white;
width:378;
height:250;
margin:50px auto;
box-shadow:0px 0px 25px black;
overflow:hidden;
}
.main:hover img
{
-webkit-transform:scale(2,2) rotate(45deg);
}
.main:hover .content
{
-webkit-transform:translate(-383px);
}
img
{
-webkit-transition: -webkit-transform: 300ms;
}
.content
{
width:378;
height:250;
background: rgba(118,115,115,0.5);
-webkit-transition: -webkit-transform: 300ms;
}
button
{
width:100%;
height:50px;
margin-top:200px;
background:black;
border:0;
cursor:pointer;
color:white;
font:16px tahoma;
}
button:hover {
opacity: 0.5;
}
<div class="main"><img src="img/switch.jpg" height="250" width="378"><div class="content"><button>Pepe Kalvier Switches</button></div></div>

You have to add values in px or in %, In your code you didn't declare a unit of measure i.e, whether you want to add px or % or em.
Demo
like this:
.main {
width:378px;
height:250px;
}

Add height and width with px in .main div
.main
{
border: 10px solid white;
width:378px;
height:250px;
margin:50px auto;
box-shadow:0px 0px 25px black;
overflow:hidden;
}
.main:hover img
{
-webkit-transform:scale(2,2) rotate(45deg);
}
.main:hover .content
{
-webkit-transform:translate(-383px);
}
img
{
-webkit-transition: -webkit-transform: 300ms;
}
.content
{
width:378;
height:250;
background: rgba(118,115,115,0.5);
-webkit-transition: -webkit-transform: 300ms;
}
button
{
width:100%;
height:50px;
margin-top:200px;
background:black;
border:0;
cursor:pointer;
color:white;
font:16px tahoma;
}
button:hover {
opacity: 0.5;
}
<div class="main"><img src="img/switch.jpg" height="250" width="378"><div class="content"><button>Pepe Kalvier Switches</button></div></div>

width:378;
height:250;
add px, pls

Just correct your css like this...
Your CSS
.main {
border: 10px solid white;
width:378;/* Your mistake is here */
height:250;/* Your mistake is here */
margin:50px auto;
box-shadow:0px 0px 25px black;
overflow:hidden;
}
Updated CSS
.main {
border: 10px solid white;
width:378px;
height:250px;
margin:50px auto;
box-shadow:0px 0px 25px black;
overflow:hidden;
}

Related

How to make responsive this code

my problem is this code that does not work when I make it responsive.. I know to change height and width must transform in percentage but this code is damaged when I make it responsive ..
This code *Css ( which I want to transform it into responsive ) :
#import url(http://weloveiconfonts.com/api/?family=entypo);
/* entypo */
[class*="entypo-"]:before {
font-family: 'entypo', sans-serif;
}
.entry{
width:430px;
position: RELATIVE;
top:600PX;
LEFT: 5PX;
margin:50px auto;
border-radius:50%;
float:left;
}
.container{
width:110px;
height:110px;
margin:0 0 30px 10px;
position:relative;
border-radius:60px;
background:rgba(255,255,255,.2);
box-shadow:3px 3px 5px rgba(0,0,0,.2);
transition:all .5s;
overflow:hidden;
}
.photo{
width:90px;
height:90px;
margin:8px;
border-radius:50%;
position:absolute;
left:0px;
overflow:hidden;
border:2px solid white;
}
.pic{ max-width:100%; }
.button{
width:60px;
height:60px;
position:absolute;
right:20px;
top:25px;
font-size:40px;
text-align:center;
line-height:60px;
border-radius:50%;
color:rgba(255,255,255,.8);
background:green;
background:linear-gradient(bottom,#5ca321,#8ab24f);
box-shadow:0 0 0 1px rgba(0,0,0,.2),
0 0 0 5px rgba(255,255,255,.1),
0 0 0 6px rgba(0,0,0,.2);
transition:all .5s;
cursor:pointer;
}
.button:hover{
background:#5ca321;
box-shadow:inset 0 1px 5px rgba(0,0,0,.3);
text-shadow:0px 0px 5px gray;
}
.name{
height:60%;
width:180px;
position:absolute;
right:80px;
padding:20px;
font:25px arial;
color:white;
opacity:0;
transition:all .5s .5s;
text-shadow:0 0 5px rgba(0,0,0,.5);
}
.small{ font-size:14px; display:block; margin-top:10px; }
.comment{
width:370px;
position:relative;
padding:15px;
font-size:16px;
color:rgba(0,0,0,.7);
border-radius:10px;
background:rgba(255,255,255,.4);
box-shadow:3px 3px 5px rgba(0,0,0,.2);
opacity:0;
transition:all 1s;
}
.comment:before{
content:'';
width:0;
height:0;
position:absolute;
bottom:100%;
left:2%;
border-bottom:15px solid rgba(255,255,255,.4);
border-left:50px solid transparent;
border-right:50px solid transparent;
border-top:15px solid transparent;
}
.container:hover{ width:400px; }
.container:hover .name,.container:hover + .comment{
opacity:1;
}
Maybe you need look demo
https://codepen.io/GARDFIELD3/pen/zNgmMP
I want to do this responsive that size and position Thank and ignore my mistakes of speech but i I do not speak English :)
It's not responsive because you don't have media queries in your CSS. As of right now, your code will run regardless of screen size, but let's say you wanted to look differently on a mobile phone, then you would do something like this:
#media screen and (max-width: 420px) {
/* put in different CSS code here */
}
You need to use media queries and target whichever element you want to change.
For example:
#media screen and (min-width: 767px) {
.entry {
margin-top: 100px;
}
}
This will add a margin-top of 100px to your .entry class for screens with a width equal to or bigger than 767px.
Read more/take a tutorial as an introduction.
Is this closer to what you want to achieve?
I've set the width of comment and entry to 100% because you probably want both div-tags to expand to the full width of the document.
Though it's true that the width will be relative to the document, this doesn't mean that any of this is responsive design. Responsive design keeps the viewport in regard. Try googling that. It's highly unlikely that there are no tutorials available in your language.
#import url(http://weloveiconfonts.com/api/?family=entypo);
#media screen and (max-width: 420px) {
/* entypo */}
[class*="entypo-"]:before {
font-family: 'entypo', sans-serif;
}
.entry{
width:100%;
position: RELATIVE;
top:60PX;
LEFT: 5PX;
margin:50px auto;
border-radius:50%;
float:left;
}
.container{
position:relative;
width:110px;
height:110px;
margin:0 0 30px 10px;
border-radius:60px;
background:rgba(255,255,255,.2);
box-shadow:3px 3px 5px rgba(0,0,0,.2);
transition:all .5s;
overflow:hidden;
}
.photo{
width:90px;
height:90px;
margin:8px;
border-radius:50%;
position:absolute;
left:0px;
overflow:hidden;
border:2px solid white;
}
.pic{ max-width:100%; }
.button{
width:60px;
height:60px;
position:absolute;
right:20px;
top:25px;
font-size:40px;
text-align:center;
line-height:60px;
border-radius:50%;
color:rgba(255,255,255,.8);
background:green;
background:linear-gradient(bottom,#5ca321,#8ab24f);
box-shadow:0 0 0 1px rgba(0,0,0,.2),
0 0 0 5px rgba(255,255,255,.1),
0 0 0 6px rgba(0,0,0,.2);
transition:all .5s;
cursor:pointer;
}
.button:hover{
background:#5ca321;
box-shadow:inset 0 1px 5px rgba(0,0,0,.3);
text-shadow:0px 0px 5px gray;
}
.name{
height:60%;
width:180px;
position:absolute;
right:80px;
padding:20px;
font:25px arial;
color:white;
opacity:0;
transition:all .5s .5s;
text-shadow:0 0 5px rgba(0,0,0,.5);
}
.small{ font-size:14px; display:block; margin-top:10px; }
.comment{
width:100%;
position:relative;
padding:15px;
font-size:16px;
color:rgba(0,0,0,.7);
border-radius:10px;
background:rgba(255,255,255,.4);
box-shadow:3px 3px 5px rgba(0,0,0,.2);
opacity:0;
transition:all 1s;
}
.comment:before{
content:'';
width:0;
height:0;
position:absolute;
bottom:100%;
left:2%;
border-bottom:15px solid rgba(255,255,255,.4);
border-left:50px solid transparent;
border-right:50px solid transparent;
border-top:15px solid transparent;
}
.container:hover{ width:100%; }
.container:hover .name,.container:hover + .comment{
opacity:1;
}
<div class="entry">
<div class="container">
<div class="button entypo-chat"></div>
<div class="name">CoStY
<span class="small">Fondator</span>
</div>
<div class="photo">
<img src="https://s12.postimg.org/pptidy8kd/14021445_1166695373388266_6290547632102759142_n.jpg" alt="" class="pic">
</div>
</div>
<p class="comment">Salut, numele meu este Enache Constantin si sunt creatorul acestei comunitati :) Puteti sa ajutati la intretinerea comunitatii printr-o donatie ,pm pentru detalii :) </p>
</div>
<div class="entry">
<div class="container">
<div class="button entypo-chat"></div>
<div class="name">Gardfield<3
<span class="small">Administrator</span>
</div>
<div class="photo">
<img src="http://farm1.staticflickr.com/133/378977890_40f31e1962_q.jpg" alt="" class="pic">
</div>
</div>
<p class="comment">Salut,numele meu este Alexandru Mihai iar misiunea mea este sa dezvolt aceasta comunitate din toate punctele de vedere. Sunt deschis la orice colaborare si ma puteti contacta pentru probleme tehnice printr-un pm :) </p>
</div>

Chrome Version 58.0.3000.4 dev (64-bit) CSS rendering issue

I noticed a strange problem on Latest Chrome Version 58.0.3000.4 dev (64-bit) My website is broken on Latest chrome DEV (Version 58.0.3000.4)[on MacOS] if you have latest chrome please check this URL http://openspeedtest.com/Get-widget.php
As you can see the buttons and animation Not rendering as expected. But working as expected on all other browser.
.example {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-transition: all .5s;
transition: all .5s;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background: -webkit-linear-gradient(top, white, black);
background: linear-gradient(to bottom, white, black);
}#ostui{
background-color: white;
height: 700px;
width: 730px;
}
#min_speed, #max_speed {
display:block;
width:auto;
margin-top:auto;
position:absolute;
top:208px;
z-index:4;
color:#35393c;
font-weight:700
}
#min_speed {
float:left;
left:63px
}
#max_speed {
right:63px;
float:right
}
#speedometer {
width:719px;
height:268px;
overflow:hidden;
margin-bottom: 5px;
margin-top: 60px;
background-color: #E5E6E7;
display:none;
}
#speedometer #inside_central {
top:18px;
left:3px;
position:relative;
width:257px;
height:257px;
margin-left:auto;
margin-right:auto;
text-align:center;
}
#speedometer #surface_plate {
border-bottom-style: solid !important;
border-bottom-width: 10px !important;
border-color: #FFFFFF;
position:relative;
top:-257px;
z-index:2;
margin-left:auto;
margin-right:auto
}
#inside_central #direction_sign {
margin-left:auto;
margin-right:auto;
position:relative;
top:50px;
left:0;
width:40px;
height:43px;
z-index:3;
overflow:hidden
}
#one_ink_visible {
position:absolute;
width:257px;
height:257px;
overflow:hidden;
top:7px;
-webkit-transform:rotate(74deg);
-moz-transform:rotate(74deg);
-o-transform:rotate(74deg);
-ms-transform:rotate(74deg)
}
#speedometer #inside_left, #speedometer #inside_right {
position:relative;
top:80px;
width:200px;
height:222px;
text-align:center
}
#speedometer #inside_left {
left:25px;
float:left
}
#speedometer #inside_right {
left:0;
float:right;
margin-right:20px
}
.side_ink {
background:url('http://get.openspeedtest.com/images/side-blue-ink.png');
position:absolute;
top:-43px;
left:0;
width:200px;
height:222px;
z-index:1
}
#inside_right .side_ink {
display:none
}
#inside_left .side_ink {
display:none
}
img#ink_segments {
left:0;
z-index:1;
position:relative
}
#direction_sign {
display:none
}
#direction_sign img {
left:0;
top:-43px;
position:relative;
z-index:3
}
.digital_speed {
font-family: 'Open Sans', Arial, sans-serif;
font-size:45px;
font-weight:400;
z-index:3;
position:relative
}
#digital_speed_current {
top:105px;
text-align:center;
width:100%;
position:absolute
}
#digital_speed_down, #digital_speed_up {
top:45px;
position:absolute;
width:100%;
text-align:center
}
.speed_caption {
font-family: 'Arial', sans-serif;
font-size:13px;
z-index:3;
position:relative
}
#speed_caption_current {
top:159px;
display:none;
position:absolute;
text-align:center;
width:100%;
font-weight:700
}
#speed_caption_down, #speed_caption_up {
position:absolute;
top:99px;
width:100%;
text-align:center;
display:none;
font-weight:700
}
/************************/
#speedometer_container{
display:block;
}
#speedometer_controller{
width: 719px;
height:100px;
overflow:hidden;
display:block;
}
#progress_bar {
margin-left:auto;
margin-right:auto;
position:relative;
width:606px;
height:73px;
background:url('http://get.openspeedtest.com/images/horizontal-progress-bar.png') no-repeat top center;
display:none;
z-index:4
}
#progress_text, #ping_result {
font-weight:700;
left:170px;
top:35px;
position:relative;
font-size:12px;
height:20px;
text-align:left;
display:inline;
margin-right:20px
}
#progress_bar_indicator {
font-weight:700;
top:16px;
left:521px;
background:#198bd9;
width:14px;
height:14px;
border-radius:50%;
position:absolute
}
#start_button_wrapper {
margin-left:auto;
margin-right: 20px;
height:auto;
left:8px;
text-align:center;
display:none;
position:relative;
z-index:4;
}
input.formatted_button {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #ffffff;
padding: 8px 20px;
background: -webkit-gradient(
linear, left top, left bottom,
from(#28adf0),
to(#117acf));
background: -o-linear-gradient(top, #28adf0, #117acf);
border-radius: 3px;
border: 1px solid #4887c7;
box-shadow:
1px 1px 0px rgba(000,000,000,0.2),
inset 0px 1px 1px rgba(255,255,255,0.2);
text-shadow:
0px 1px 1px rgba(000,000,000,0.3),
0px 1px 0px rgba(255,255,255,0.3);
margin-bottom:10px;
outline:none;
}
input.formatted_button:hover {
border-top-color: #1090e6;
}
input.formatted_button:active {
top:2px;
position:relative;
border-top-color: #1090e6;
background: #117acf;
}
input.formatted_button_bw {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #303030;
padding: 7px 20px;
background: -webkit-gradient(
linear, left top, left bottom,
from(#f7f7f9),
to(#e0e4e8));
background: -o-linear-gradient(top, #f7f7f9, #e0e4e8);
border-radius: 4px;
border: 1px solid #b8b8b8;
box-shadow:
0px 1px 0px rgba(000,000,000,0.5),
inset 0px 0px 1px rgba(255,255,255,0.3);
text-shadow:
0px 1px 1px rgba(255,255,255,1);
}
input.formatted_button_bw:hover {
border-top-color: #e0e4e8;
background: #e0e4e8;
}
input.formatted_button_bw:active {
top:2px;
position:relative;
border-top-color: #e0e4e8;
background: #e0e4e8;
}
#ip_container {
font-family: 'PT Sans',sans-serif;
font-size: 18px;
font-weight: 700;
margin-top: 10px;
}
#ip_address {
font-weight: 300;
}
#chart_container{
width:490px;
height:60px;
margin-left:auto;
margin-right:auto;
overflow:hidden;
margin-top:-17px;
top:17px;
left:-10px;
position:relative;
}
.spinner {
width: 120px;
height: 120px;
margin: 100px auto;
background-color: #44A8FC;
border-radius: 100%;
-webkit-animation: scaleout .5s infinite ease-in-out;
animation: scaleout .5s infinite ease-in-out;
}
#-webkit-keyframes scaleout {
0% { -webkit-transform: scale(0.0) }
100% {
-webkit-transform: scale(1.0);
opacity: 0;
}
}
#keyframes scaleout {
0% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
} 100% {
transform: scale(1.0);
-webkit-transform: scale(1.0);
opacity: 0;
}
}
That was a bug on Latest chrome Dev. I reported the same https://bugs.chromium.org/p/chromium/issues/detail?id=689369

Divs not using z-index

The issue
I have a fixed navigation bar on my website (z-index: 98) and a rotating banner (z-index: 96).
When I scroll down, however, the content positioned relatively on the banner appears higher (in z-space) than the navigation bar.
Screenshots
Code
Banner:
div#banner {
padding-top:60px;
z-index: 98;
width: 100%;
background: url(../img/bannerImg_1.jpg) no-repeat center center;
background-size:cover;
height:340px;
border-bottom: 1px solid #422358;
box-shadow: 0 10px 10px -10px black;
z-index: 96;
}
div#banner div#bannerWrap {
width:1080px;
margin: 0 auto;
height:100%;
position:relative;
}
div#bannerWrap div#logoLeft {
position:absolute;
top:50%; margin-top:-164px;
left:0;
width:305px;
height:328px;
background: url(../img/bannerLogo.png) no-repeat center center;
float:left;
}
div#bannerWrap div#logoRight {
position:absolute;
top:50%; margin-top:-164px;
right:0;
width:305px;
height:328px;
background: url(../img/bannerLogo.png) no-repeat center center;
float:right;
}
div#bannerWrap div#textRight {
position:absolute;
top:50%; margin-top:-20px;
right:0;
text-align:right;
color:white;
font-weight:bold;
font-size:28px;
text-shadow: 3px 3px 0 #1f3848;
float:right;
}
Navbar:
div#topBar {
width:100%;
height:60px;
margin:0 auto; padding:0;
background: #1f3848;
color:white;
font-size:12px;
position:fixed;
}
div#topBar div#tBContainer {
width:1080px;
margin: 0 auto; padding: 0;
}
div#topBar div#tBLogo {
width:56px;
height:60px;
background: url(../img/tB_logo.png) no-repeat;
display:block;
float:left;
margin-right:20px;
}
div#topBar div#tBLeft {
float:left;
padding-top:15px;
}
div#topBar div#tBRight {
float:right;
padding-top:15px;
text-align:right;
}
By default, z-Index doesn't work with position:static elements.
It only works with position:relative/absolute/fixed elements.
This might work:
div#banner
{
position:relative;
z-index:96;
}
Reference: z-index - CSS-Tricks
z-index repeated twice please check. and you don't have to specify any z-index to div#banner. please follow below css
div#banner {
padding-top:60px;
width: 100%;
background: url(../img/bannerImg_1.jpg) no-repeat center center;
background-size:cover;
height:340px;
border-bottom: 1px solid #422358;
box-shadow: 0 10px 10px -10px black;
}
div#topBar {
width:100%;
height:60px;
margin:0 auto; padding:0;
background: #1f3848;
color:white;
font-size:12px;
position:fixed;
z-index:2;
}
why you giving the z-index value twice? Also by watching the screenshot its clear banner is coming over the navigation because of higher z-index value. either give this one negative value or the give the positive higher value to navigation.
div#banner {
padding-top:60px;
z-index: 98;/* repeated*/
width: 100%;
background: url(../img/bannerImg_1.jpg) no-repeat center center;
background-size:cover;
height:340px;
border-bottom: 1px solid #422358;
box-shadow: 0 10px 10px -10px black;
z-index: 96;/* repeated */
}
Note: while using z-index its required to use positioning either relative or absolute

Make CSS divs overlap?

There were many tutorials for this, but they weren't much a help for me.
When I scroll the page down, the content should go under the ´header´, not on top of it.
The footer works as it should.
http://jsfiddle.net/D4c4n/
body {
font-family:helvetica;
margin: auto;
min-height: 100%;
width: 100%;
background-image:url('nainen.jpg');
background-repeat: none;
}
.main {
min-height: 100%;
height:100%;
}
#background {
height: 100%;
width: 100%;
}
.ca-menu li:hover{
background:#fff;
}
.ca-menu li:hover .ca-icon{
color: #afa379;
font-size: 40px;
opacity: 0.1;
animation: moveFromLeft 400ms ease;
}
.ca-menu li:hover .ca-main{
color: #afa379;
animation: moveFromRight 300ms ease;
}
.ca-menu li:hover .ca-sub{
color: #000;
animation: moveFromBottom 500ms ease;
}
#keyframes moveFromLeft{
from {
transform: translateX(-100%);
}
to {
transform: translateX(0%);
}
}
.fl {
top:150px;
width: 100%;
transition: all;
position: absolute;
}
.slidepart {
width:100%;
height:390px;
overflow:hidden;
position:relative;
border:#lightgray solid 2px;
box-shadow:gray 2px 5px 5px;
}
.slidepart img {
position:absolute;
width:100%;
height:450px;
border: black solid 1px;
}
.sl_paginationpart {
display:block;
background:#BFFF8D9;
width:100%;
height:1px;
position:absolute;
right:0px;
bottom:0px;
padding:6px;
border: solid 1px #FFE97D;
transition:all 0.5s ease
}
.sl_paginationpart:hover {
height:17px;
opacity: 0.8;
background:#908967;
}
ul.slpagination {
margin:0px;
padding:0px;
list-style:none;
font-family:helvetica;
right: 0px;
}
ul.slpagination:hover {
margin:0px;
padding:0px;
list-style:none;
font-family:helvetica;
}
ul.slpagination li {
margin:0px;
padding:0px;
list-style:none;
float:left;
height:100%
}
ul.slpagination li a {
text-decoration:none;
}
ul.slpagination li a.prev {
width:14px;
height:15px;
display:block;
margin-top: 2px;
}
ul.slpagination li a.next {
width:14px;
height:15px;
display:block;
margin-top: 2px;
}
ul.slpagination li a.number {
background:#FFE97D;
width:25px;
height:4px;
display:block;
text-align:center;
margin:0px 3px;
font-size:0px;
font-weight:bold;
color:#A3916D;
text-decoration:italic;
font-family: helvetica;
border-radius:3px 3px 3px 3px;
transition: all 0.5s ease;
}
ul.slpagination li a.number:hover {
background:#FFF8D9;
color:gray;
height:18px;
font-size:12px;
}
ul.slpagination li a.select {
background:#B78B59;
color:white;
text-decoration:none;
text-decoration:italic;
font-size:0px;
}
.sl_paginationpart:hover li a.select {
height: 18px;
font-size: 14px;
}
.sl_paginationpart:hover li a.number {
height: 18px;
}
#logo {
opacity: 1;
}
.kielet {
top:0px;
width:100%;
background-color: #333333;
padding:0px;
height: 35px;
color: white;
}
.kielet nav {
text-align: left;
height: 35px;
}
.kielet a {
display: inline;
left: 0px;
}
.icon {
width: 50px;
height: 101%;
right: 0px;
float: right;
margin:0 10px;
margin-top:0px;
margin-bottom:0px;
padding: 0px;
}
.submit {
-moz-box-shadow:inset 0px 1px 0px 0px #dcecfb;
-webkit-box-shadow:inset 0px 1px 0px 0px #dcecfb;
box-shadow:inset 0px 1px 0px 0px #dcecfb;
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #71f78c), color-stop(1, #5dde56) );
background:-moz-linear-gradient( center top, #71f78c 5%, #5dde56 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#71f78c', endColorstr='#5dde56');
background-color:#71f78c;
-webkit-border-top-left-radius:0px;
-moz-border-radius-topleft:0px;
border-top-left-radius:0px;
-webkit-border-top-right-radius:0px;
-moz-border-radius-topright:0px;
border-top-right-radius:0px;
-webkit-border-bottom-right-radius:0px;
-moz-border-radius-bottomright:0px;
border-bottom-right-radius:0px;
-webkit-border-bottom-left-radius:0px;
-moz-border-radius-bottomleft:0px;
border-bottom-left-radius:0px;
text-indent:0px;
border:1px solid #93e084;
display:inline-block;
color:#ffffff;
font-family:Trebuchet MS;
font-size:16px;
font-weight:normal;
font-style:normal;
height:30px;
line-height:30px;
width:60px;
text-decoration:none;
right: 40%;
text-align:center;
text-shadow:1px 1px 0px #528ecc;
}
.submit:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #5dde56), color-stop(1, #71f78c) );
background:-moz-linear-gradient( center top, #5dde56 5%, #71f78c 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5dde56', endColorstr='#71f78c');
background-color:#5dde56;
}
.submit:active {
position:relative;
top:1px;
}
.tiedot {
right: 100px;
top: 150px;
height: 250px;
position:absolute;
width: 250px;
border: dotted 1px;
text-align: center;
}
.lomake {
right: 35%;
top: 150px;
position:absolute;
}
.parent {
font-family: Verdana;
height: 30px;
font-size: 20px;
transition: background 0.5s ease;
}
.parent:hover {
background: #C2C3C4;
}
.parent a {
color: black;
text-decoration: none;
cursor: pointer;
}
.show ul
{
/*animation for show*/
transition:max-height 1s;
-webkit-transition:max-height 1s;
max-height: 100%;
}
.navigointi
{
width: 533px;
height: 35px;
top: 0px;
position: absolute;
background-color: #333333;
}
.navigointi ul
{
float:left;
width:100%;
padding:0;
margin:0;
list-style-type:none;
}
.navigointi a
{
float:left;
width:6em;
top: 0px;
text-decoration:none;
color:white;
background: FFE97D;
padding:0.2em 0.6em;
border-right:1px solid white;
height:29px;
transition: all 0.5s ease;
}
.navigointi a:hover
{
color: #B0B0B0;
}
.navigointi li
{
display:inline;
}
#selected {
background-color:white;
color: #645406;
cursor: default;
}
form {
right: 50%;
}
.wrapper{
min-height: 100%;
height:100%;
margin: 0 0 -60px;
}
.push{
height:60px;
}
footer
{
background-color:#333333;
position:fixed;
height:20px;
bottom: 0px;
margin-bottom: 0px;
width:100%;
text-align: right;
}
header
{
top:0px;
width:100%;
background-color: #333333;
padding:0px;
height: 35px;
color: white;
position: fixed;
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<script src="jquery-1.4.2.min.js"></script>
<link rel="shortcut icon" href="clade.png" />
<link rel="stylesheet" type="text/css" media="screen" href="style_v2.css" />
<title>Artotek</title>
<LINK REL="SHORTCUT ICON"
HREF="favicon.ico">
<body>
<div class="wrapper">
<!-- KIELET -->
<header>
<div class="navigointi">
<ul>
<li><a id="selected" onclick="return false" href="#">Etusivu</a></li>
<li>Tietoa meistä</li>
<li>Yhteystiedot</li>
</ul>
</div>
</header>
<div id="footer" style="bottom:0px; right:0px; width:100px; font-size:8px;">
</div>
<div class="main">
<div id="teksti" style="position:absolute; font-family:century gothic; width:100%; top: 40px; font-size: 20px; height:130px; margin-top:0px; text-align:center; ">
<br>
<h3>ARTOTEK</h3>
<hr>
<p>Olemme startup innovatiivisten tuotteiden kehitysyritys<br>
Kysyttävää? Ota yhteyttä!</p>
</div>
<div style="margin-top: 800px;">
<a name="section2">Section 2</a>
<p>blablalblalalalalalal</p>
<p>lddlwdlldwldldwdlwdl</p>
</div>
</div>
</div>
</div>
<!--Twitter
<div class="twitter" style="width:50px; top:0px; margin-top:0px;">
<a class="twitter-timeline" href="https://twitter.com/ArtotekTmi" data-widget-id="381408956653899776">#ArtotekTmi Twitter</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>
<img style="position:absolute; bottom:0px; right:0px;"src="nainen.gif"></img>-->
</div>
<div class="push"></div>
<footer>©Claudio Lintunen</footer>
</body>
</html>
You can change the z-index for this:
header
{
z-index: 1;
}
This way the header will go on top of the other elements which have a lower z-index (z-index is 0 by default).
jsFiddle
put z-index to header part
.navigointi
{
width: 533px;
height: 35px;
top: 0px;
position: absolute;
background-color: #333333;
z-index:99999;
}
jsfiddle:http://jsfiddle.net/D4c4n/3/
If you add z-index: 1; to your header rule it will work just fine.
header
{
top:0px;
width:100%;
background-color: #333333;
padding:0px;
height: 35px;
color: white;
position: fixed;
z-index: 1;
}
If z-index: 1 does'nt work try increase the z-index till it does.

Positioning Prev and Next Buttons (on NivoSlider)

I am using the nivoSlider on a page.
I adapted a Theme to my needs, but i would now like to have the Prev and Next buttons next to the image (Prev on the left side, and Next on the right site), instead of on top of the image.
You can see the test page here:
http://dccf.site88.net/test/dccf.php
here is the html:
<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<img src="_imgs/photos/fashion3.jpg" alt="Doncare Care Child Foundation" />
<img src="_imgs/photos/fashion4.jpg" alt="Doncare Care Child Foundation" />
<img src="_imgs/photos/fashion7.jpg" alt="Doncare Care Child Foundation" />
<img src="_imgs/photos/fashion9.jpg" alt="Doncare Care Child Foundation" />
<img src="_imgs/photos/GardenWork1.jpg" alt="Doncare Care Child Foundation" />
<img src="_imgs/photos/GardenWork2.jpg" alt="Doncare Care Child Foundation" />
<img src="_imgs/photos/GardenWork3.jpg" alt="Doncare Care Child Foundation" />
<img src="_imgs/photos/GardenWork4.jpg" alt="Doncare Care Child Foundation" />
</div><!-- enf of #slider -->
</div><!-- end of .sliderWrapper -->
and the CSS (from the base template):
.nivoSlider {
position:relative;
width:600px;
height:auto;
overflow: hidden;
margin:auto;
margin-top:1em;
}
.nivoSlider img {
position:absolute;
top:0px;
max-width: 600px;
max-height:420px;
}
.nivo-main-image {
display: block !important;
position: relative !important;
width: 600px !important;
height:420px !important;
margin:auto;
}
/* If an image is wrapped in a link */
.nivoSlider a.nivo-imageLink {
position:absolute;
top:0px;
width:100%;
height:100%;
border:0;
padding:0;
margin:auto;
z-index:6;
display:none;
}
/* The slices and boxes in the Slider */
.nivo-slice {
display:block;
position:absolute;
z-index:5;
height:100%;
top:0;
margin:auto;
}
.nivo-box {
display:block;
position:absolute;
z-index:5;
overflow:hidden;
margin:auto;
}
.nivo-box img {
display:block;
margin:auto;
}
/* Caption styles */
.nivo-caption {
position:absolute;
left:0px;
bottom:0px;
background:#000;
color:#fff;
width:100%;
z-index:8;
padding: 5px 10px;
opacity: 0.8;
overflow: hidden;
display: none;
-moz-opacity: 0.8;
filter:alpha(opacity=8);
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */
}
.nivo-caption p {
padding:5px;
margin:0;
}
.nivo-caption a {
display:inline !important;
}
.nivo-html-caption {
display:none;
}
/* Direction nav styles (e.g. Next & Prev) */
.nivo-directionNav a {
position:fixed;
top:50%;
z-index:9;
cursor:pointer;
}
.nivo-prevNav {
left:0px;
}
.nivo-nextNav {
right:0px;
}
/* Control nav styles (e.g. 1,2,3...) */
.nivo-controlNav {
text-align:center;
padding: 15px 0;
}
.nivo-controlNav a {
cursor:pointer;
}
.nivo-controlNav a.active {
font-weight:bold;
}
and the Theme CSS:
.theme-default .nivoSlider {
position:relative;
background:#fff url(loading.gif) no-repeat 50% 50%;
margin-bottom:10px;
-webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
-moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
box-shadow: 0px 1px 5px 0px #4a4a4a;
}
.theme-default .nivoSlider img {
position:absolute;
display:none;
margin:auto;
}
.theme-default .nivoSlider a {
border:0;
display:block;
margin:auto;
}
.theme-default .nivo-controlNav {
text-align: center;
padding:0;
}
.theme-default .nivo-controlNav a {
display:inline-block;
width:10px;
height:10px;
background:url(bullets.png) no-repeat;
text-indent:-9999px;
border:0;
margin: 0 2px;
margin-bottom:1em;
}
.theme-default .nivo-controlNav a.active {
background-position:0 -10px;
}
.theme-default .nivo-directionNav a {
display:block;
width:30px;
height:30px;
background:url(arrows6.png) no-repeat 0px 0;
text-indent:-9999px;
border:0;
opacity: 1;
/* -webkit-transition: all 200ms ease-in-out;
-moz-transition: all 200ms ease-in-out;
-o-transition: all 200ms ease-in-out;
transition: all 200ms ease-in-out;
}*/}
.theme-default a.nivo-nextNav {
position:absolute;
background-position:-30px 0;
right:2px;
z-index:9999;
}
.theme-default a.nivo-nextNav:hover {
background:url(arrows6.png) no-repeat -30px -30px;
right:2px;
}.theme-default a.nivo-nextNav:active {
background:url(arrows6.png) no-repeat -30px -60px;
right:2px;
}
.theme-default a.nivo-prevNav {
position:absolute;
left:2px;
}
.theme-default a.nivo-prevNav:hover {
background:url(arrows6.png) no-repeat 0px -30px;
left:2px;
}
.theme-default a.nivo-prevNav:active {
background:url(arrows6.png) no-repeat 0px -60px;
left:2px;
}
.theme-default .nivo-caption {
font-family: Helvetica, Arial, sans-serif;
}
.theme-default .nivo-caption a {
color:#fff;
border-bottom:1px dotted #fff;
}
.theme-default .nivo-caption a:hover {
color:#fff;
}
.theme-default .nivo-controlNav.nivo-thumbs-enabled {
width: 100%;
}
.theme-default .nivo-controlNav.nivo-thumbs-enabled a {
width: auto;
height: auto;
background: none;
margin-bottom: 5px;
}
.theme-default .nivo-controlNav.nivo-thumbs-enabled img {
display: block;
width: 120px;
height: auto;
}
Thank you for your time and help!
.nivoSlider - in this class you have to remove overflow:hidden, and then you have to change the left and right of your buttons:
.nivoSlider{
overflow:hidden; (remove it)
}
And then:
.theme-default a.nivo-prevNav{
left: -35px; (about)
}
.theme-default a.nivo-prevNav:hover{
left: -35px; (about)
}
.theme-default a.nivo-nextNav{
right: -35px; (about)
}
.theme-default a.nivo-nextNav:hover{
right: -35px; (about)
}

Resources