Unable To View Pictures in CSS Slideshow - html

I have a code for a CSS slideshow that goes left and right upon hover. However, when I edit the code to place the images into the slideshow, nothing shows up. This is the slideshow and you can see a working version of it in the bottom left hand corner of the page here; however, I cannot get mine to do the same thing and load the images.
HTML:
<div class="all"><div class="trash"></div><div class="buttons"><div class="back"><div class="goleft"></div><div class="container"><div class="textne"><b>[DESCRIPTION]</b></div>
<div class="imagene"><img src="[IMAGE URL]"></div>
</div></div></div></div><div class="linku"><p>[LINK NAME]</p></div>
CSS:
*{background:none; border:none; margin:0;}
a.external:after {display:none!important;}
span.user-symbol {display:none!important;}
a {font-weight:normal!important;}
.gr-top{display:none;}
.gr-top h2 img{display:none;}
.gr-top h2{display:none;}
.gr-top span{display:none;}
.tri{display:none;}
.gr1{display:none;}
.gr2{display:none;}
.gr3{display:none;}
.commentslink, .prevlink{display:none;}
.hsep{display:none;}
.bottom {display:none;}
.list {display:none;}
.gr-box{
cursor:default;
z-index:99!important;
line-height:1.2em;
font-family:Lucida Console;
font-size:10px;
}
.gr-body, .text{
position:relative;
width:550px;
overflow:hidden;
margin:0px auto;
text-align:center;
}
.back{
width:500px;
height:300px;
background:transparent;
overflow:hidden;
margin-left:0px;
border-left:1px solid #000;
border-right:1px solid #000;
border-bottom:1px solid #000;
}
.container{
width:[CONTAINER WIDTH]px;
height:300px;
margin-left:0px;
text-align:left;
transition:all 5s linear 360s;}
.container:hover{
margin-left:-[MARGIN]px;
transition:all 5s linear;
}
.goleft {
position:absolute;
background:#000;
opacity:0;
width:200px;
height:300px;
z-index:9999;
cursor:url(http://orig09.deviantart.net/aa48/f/2015/327/f/2/arrow_by_codingtrash-d9hpzk9.png), auto; }
.goleft:hover + .container{
margin-left:0px;
transition:all 4s linear; }
.container u{
position:relative;
display:inline-block;
text-decoration:none;
width:100px;
height:150px;
overflow:hidden;
padding:50px 30px;
text-align:center; }
.imagene{
position:relative;
display:inline-block;
background:#777;
margin-top:8px;
margin-left:8px;
height:280px;
border:1px solid #333;
transition:all .4s;
}
.imagene img{
opacity:0.8;
height:280px;
transition:all .4s;
}
.imagene img:hover{
opacity:1;
}
.imagene:hover {
border:1px solid #fff; }
.textne{
position:relative;
display:inline-block;
background:#777;
margin-top:8px;
width:200px;
margin-left:8px;
height:280px;
border:1px solid #333;
transition:all .4s;
}
.textne b{
text-align:center;
color:white;
opacity:0.8;
font-weight: normal;
position:absolute;
padding:110px 50px;
transition:all .4s;
}
.trash {
position:absolute;
width:500px;
height:150px;
background:#999;
margin-top:75px;
z-index:-9;
border:1px solid #000;
}
.all {
margin-left:-10px;}
.linku{
display:inline-block;
height:30px;
border:1px solid #000;
color:#222;
margin-top:-1px;
margin-left:-30px;
text-align:left;
width:200px;
background:#999;
overflow:hidden;
transition:all .3s;
}
.linku:hover {
background:#888;
color:#000;
border:1px solid #fff;
border-top:1px solid #000;
}
.linku p{
text-align:center;
width:200px;
padding-top:10px;
transition:all .3s;
}

The code works fine. You need to include proper "width" and "margin" property in the container and container:hover css rule
I have attached a fiddle link.
.container{
width: 1700px;
height:300px;
margin-left:0px;
text-align:left;
transition:all 5s linear 360s;
}
.container:hover{
margin-left:-1015px;
transition:all 5s linear;
}
https://jsfiddle.net/karthick6891/z9atpexz/
Note: The whole carousel depends on lot of hardcoded values and you have to give proper image sizes to fit the content within it. Kindly look into some carousel's like slick carousel or owl carousel etc.,

Related

Content shifting down in DIVs?

I'm working on this project here:
https://codepen.io/WHITE-RABBIT/pen/aMzLWy
I've got pretty much everything in place, but when I use zoom to check that my elements stay in place, I find that all of my content shifts downward. The widths pretty much remain the same, but the headers seem to cause some space and also for the life of me I cannot get my links container to not change size. I know there is probably a fairly simple solution for this, but I have been wracking my brain for hours and I just cannot think of what I did wrong here.
I will split this into sections.
Header:
/**HEADER SECTION**/
.header
{
width:100%;
height:5vmin;
max-height:5vmin;
left:0vmin;
top:0vmin;
margin-top:0vmin;
position:relative;
pointer-events:auto;
z-index:30;
background-color:RED;
}
.header h1
{
font-family:Barlow;
font-size:2vmin;
color:#9dc7ff;
font-weight:bold;
text-transform:uppercase;
letter-spacing:0.5vmin;
margin-top:1vmin;
position:relative;
display:inline-block;
background-color:GREEN;
}
.header u
{
text-decoration:none;
font-size:2vmin;
letter-spacing:0.1vmin;
font-weight:100;
font-style:italic;
font-family:'Black Han Sans', sans-serif;
color:#ff6ade;
}
.header-links
{
width:70%;
height:auto;
padding-top:0%;
margin-top:-3.5vmin;
margin-left:24.2vmin;
right:0%;
position:fixed;
float:right;
background-color:BLUE;
}
.header-links a
{
font-family:Roboto;
font-size:1.02vmin;
letter-spacing:0.2vmin;
width:auto;
height:auto;
position:relative;
padding-bottom:2vmin;
padding-top:0vmin;
color:WHITE;
margin-right:2vmin;
text-decoration:none;
text-transform:uppercase;
display:inline;
border-bottom:0vmin solid RGBA(255,255,255,0.0);
-webkit-transition: all 0.7s ease-in-out;
-moz-transition: all 0.7s ease-in-out;
-ms-transition: all 0.7s ease-in-out;
-o-transition: all 0.7s ease-in-out;
transition: all 0.7s ease-in-out;
}
.header-links a:hover
{
border-bottom:2px solid #2de3ff;
color:#ff2dce;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.header span
{
display:inline-block;
width: 0.5vmin;
max-width:0.5vmin;
max-height:0.5vmin;
height: 0.5vmin;
top:-0.1vmin;
margin-right:2vmin;
position:relative;
background-color:#2de3ff;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
Sider:
.sider
{
width:29%;
height:80vmin;
position:relative;
z-index:2;
margin-top:-7vmin;
pointer-events:auto;
background-color:TRANSPARENT;
}
.sider display
{
height:40%;
width:100%;
top:8vmin;
position:relative;
display:inline-block;
background-image:URL('https://i.imgur.com/KrGRmvE.gif');
background-size:cover;
background-position:center;
-webkit-border-radius: 20px 20px 0px 0px;
border-radius: 10% 10% 10% 10%;
}
.title
{
height:4vmin;
width:90%;
left:1vmin;
position:relative;
display:inline-block;
top:9vmin;
font-family:Barlow;
font-size:1.9vmin;
line-height:1.2vmin;
}
.sider desc
{
height:auto;
width:95%;
left:1vmin;
top:10vmin;
position:relative;
display:inline-block;
font-family:'Roboto Condensed', sans-serif;
font-size:1.3vmin;
font-weight:100;
line-height:1.5vmin;
opacity:0.8;
text-align:justify;
letter-spacing:0.03vmin;
}
.title icon
{
height:8vmin;
width:8vmin;
max-height:8vmin;
max-width:8vmin;
display:inline-block;
position:relative;
margin-top:-4vmin;
margin-right:1vmin;
left:0vmin;
float:left;
background-color:PURPLE;
background-image:URL('https://i.redd.it/glxbid0p79r11.jpg');
background-size:cover;
border:0.5vmin solid BLACK;
-webkit-border-radius: 50%px;
border-radius: 50%;
}
.buttons-container
{
height:auto;
width:100%;
margin-top:13vmin;
white-space:nowrap;
font-family:Roboto;
line-height:0vmin;
text-transform:uppercase;
}
.button
{
height:2.3vmin;
width:2.3vmin;
max-height:2.3vmin;
max-width:2.3vmin;
margin-right:1vmin;
display:inline-block;
background-image:URL('https://s3-us-west-2.amazonaws.com/s.cdpn.io/217361/discord-icon-free-download-at-icons8-33230.png');
background-position:center;
background-repeat:no-repeat;
background-size:cover;
}
.button2
{
height:2.3vmin;
width:2.3vmin;
margin-right:1vmin;
display:inline-block;
background-image:URL('https://s3-us-west-2.amazonaws.com/s.cdpn.io/217361/kisspng-league-of-legends-computer-icons-riot-games-wall-decals-5b11738fe19235.371578411527870351924.png');
background-position:center;
background-repeat:no-repeat;
background-size:cover;
}
.buttons-container span
{
top:-0.8vmin;
margin-right:1vmin;
display:inline-block;
position:relative;
background-color:GREEN;
font-size:1vmin;
}
The HTML section can be seen on the pen. I'm not going to post it because I am 99% sure that it has nothing to do with my HTML.
I appreciate everyone's time. Hopefully I can find a solution to this soon. Thank you.
Your design isn't responsive, you're working with your screen size only but when the design is displayed in another screen everything will not be the same as it was in your screen
You can follow this guide to get better results

My CSS code is not running please check

body{
margin:0;
padding:0;
background-color:#f1ff36;
font-family:verdana;
}
.center{
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%);
}
a{
position:relative;
text-decoration:none;
border:2px solid transparent;
width:100px;
height:50px;
text-align:center;
line-height:50px;
display:inline-block;
font-size:24px;
color:#262626;
}
a:before{
content:'';
position:absolute;
top:-2px;
left:-2px;
width:0;
height:0;
background:transparent;
border:2px solid transparent;
}
a:hover:before{
animation:animate 1s linear forwards;
}
#keyframes animate{
0%{
width:0;
height:0;
border-top-color:#262626;
border-right-color:transparent;
border-bottom-color:transparent;
border-left-color:transparent;
}
50%{
width:100%;
height:0;
border-top-color:#262626;
border-right-color:#262626;
border-bottom-color:transparent;
border-left-color:transparent;
}
100%{
width:100%;
height:100%;
border-top-color:#262626;
border-right-color:#262626;
border-bottom-color:transparent;
border-left-color:transparent;
}
}
a:hover:after{
animation:animate2 1s linear forwards;
animation-delay:1s;
}
#keyframes animate2{
0%{
width:0;
height:0;
border-top-color:transparent;
border-right-color:transparent;
border-bottom-color:transparent;
border-left-color:#262626;
}
50%{
width:0;
height:100%;
border-top-color:transparent;
border-right-color:transparent;
border-bottom-color:#262626;
border-left-color:#262626;
}
100%{
width:100%;
height:100%;
border-top-color:transparent;
border-right-color:transparent;
border-bottom-color:#262626;
border-left-color:#262626;
}
}
animate2 is not working at all tell me the error which is occuring in this code.
In this code as you can see there are two animations first animation is working fine but the second animation ie animate2 is not working at all. Tell me at which point I am making the mistake I am really confused and frustrated trying and trying to run this code but to no avail.
I think you forgot to add empty content block a:after
Take a look at this codepen
a:before, a:after {

Making Animated Dropdown Menu by Using Pure CSS Like Bootstrap does

I'm working with my own project to build a stylesheet(CSS) as what bootstrap does. However, I try to use only PURE CSS - no javascript or jquery even flash to do that.
Now, I'm having trouble with the Animated Menu Dropdown when small resizing
as what mobile version looks like.
What I want is:
First, When the browser resize less then 768 and 480 or (55%), the animated circle menu
appears, animating and Menu is hidden. After that, on hover (<div class="acn-menu"></div>), the animated circle menu runs again. When user click or touch the animated circle menu, the animated circle menu stops and the dropdown menu appears and push the
content below it with no scrollbar at the same time as the animated circle rolls back and stops.
Second, How to be compatible with all browsers (even, in IE).
Here's what I have done more than a week: (Sorry for my bad English):
I have just uploaded the sample in this site below:
Demo The Dropdown-Menu
HTML:
<header>
<div id="acn-border"></div><div class="acn-title"><a href="#">
<h1>Appacyber</h1></a></div>
<div class="menu-container">
<div class="acn-menu"></div>
<nav>
<ul class="main-menu">
<li><a href="#" class="home"><span class="fa
fa-home"></span> Home</a></li>
<li><a href="#">Produk <span class="fa fa-caret-
down"></span> </a>
<ul class="sub-menu">
<li>Desain Website</li>
<li>Desain/Edit CMS</li>
<li>Order Template Blogspot</li>
</ul>
</li>
<li><a class="dropdown" href="#">Pembayaran <span
class="fa fa-caret-down"></span> </a>
<ul class="sub-menu">
<li>Via Transfer Bank</li>
<li>Via Pulsa</li>
<li>Via Paypal</li>
</ul>
</li>
<li>Order</li>
<li>Contact</li>
<input type="text" class="input-acn-search"
placeholder="search ..."/><button type="button" class="btn-search">&
gt;</button>
</ul>
</nav>
</div>
</header>
<!--here the content to be pushed when the screen in small rezise-->
STYLESHEET:
<style>
.input-acn-search{
border:1px solid #979797;
padding:7px 34px 7px 7px;
font-size:14px;
font-weight:400;
color:#111;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px;
margin:7px 0px 0px 10px;
}
.btn-search{
background:#006666;
color:#fff;
border:0px;
font-size:18px;
margin:0px 0px 0px -30px;
-webkit-border-radius:17px;
-moz-border-radius:17px;
border-radius:17px;
border:0px;
min-width:5%;
}
.input-acn-search:hover{
background:#fff;
border:1px solid #979797;
}
.input-acn-search placeholder{
color:#666666;
}
.acn-title{
margin:0px;
height:45px;
padding:0px 25px 0px 25px;
background:#FF9900;
line-height:normal;
vertical-align:middle;
display:table-cell!important;
}
.menu-container{
width:100%;
margin:0px;
height:45px;
padding:0px;
background:#222222;
line-height:normal;
vertical-align:middle;
display:table-cell!important;
}
.acn-title a,.acn-title a h1{
color:#FFFFFF;
font-size:19px;
font-weight:500;
font-style:normal;
font-size-adjust:inherit;
}
.acn-title a:hover,.acn-title a:hover h1{
color:#999;
}
#acn-border{
position:absolute;
width:20px;
height:20px;
border-top:17px solid transparent;
border-left:21px solid #FF9900;
border-bottom:17px solid transparent;
display:table-cell;
margin-top:7px;
margin-left:140px;
z-index:1;
}
ul,li,ul li{
list-style:none;
list-style-image:none;
background:none;
}
/*------menu-------*/
nav ul.main-menu li a{
color:#fff;
}
.home a{
background:#9966CC;
color:#e0e0e0;
-webkit-border-radius:0px 37px 37px 0px;
border-radius:0px 37px 37px 0px;
}
nav ul {
-webkit-font-smoothing:antialiased;
background:#222222;
margin:0;
padding:0;
height:45px;
}
nav li {
float:left;
margin:0;
padding:0;
position:relative;
min-width:110px;
}
nav a {
background:none;
display:block;
font:normal 14px/50px Ubuntu;
padding:0 25px;
text-align:center;
text-decoration: none;
}
li a{
color:#e0e0e0;
background:none;
}
nav li:hover a {
background:#000;
color:#e0e0e0;
}
nav li ul {
float:left;
left:0;
opacity:0.5;
position:absolute;
top:35px;
visibility:hidden;
z-index:1;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
nav li:hover ul {
opacity:1;
top:50px;
visibility:visible;
}
nav li ul li {
float:none;
width:100%;
}
nav li ul a:hover {
background:#666666;
color:#fff;
}
ul.sub-menu{
min-width:180px;
max-width:100%;
}
ul.sub-menu li:hover{
background-color:#000;
color:#fff;
border:0px;
border:none;
}
#media screen and (max-width:55%){/*bila screen maksimum 55% atau sama dengan #bingkai-mini*/}
#media screen and (max-width:768px) and (max-width:480px) {
.acn-menu{
display:block;
visibility:visible;
width:37px;
height:37px;
margin-top:0px;
margin-right:17px;
margin-left:17px;
background:none;
border:10px inset #428BCA;
-webkit-transform:rotate(-180deg);
-moz-transform:rotate(-180deg);
-o-transform:rotate(-180deg);
transform:rotate(-180deg);
-webkit-transition-duration:2s;
-moz-transition-duration:2s;
-o-transition-duration:2s;
transition-duration:2s;
-webkit-border-radius:50%!important;
-moz-border-radius:50%!important;
-o-border-radius:50%!important;
border-radius:50%!important;
}
.menu-container .acn-menu:hover{
cursor:pointer;
display:block;
visibility:visible;
width:37px;
height:37px;
margin-right:17px;
margin-left:17px;
background:none;
border:10px inset #FF00FF;
-webkit-transform:rotate(180deg);
-moz-transform:rotate(180deg);
-o-transform:rotate(180deg);
transform:rotate(180deg);
-webkit-transition-duration:2s;
-moz-transition-duration:2s;
-o-transition-duration:2s;
transition-duration:2s;
}
.acn-title{
width:100%;
-webkit-border-radius:0px;
border-radius:0px;
position:relative;
}
.acn-border{
display:none;
}
/*---------------MENU------------------*/
header{
position:relative;
}
nav{
position:absolute;
right:0px;
top:47px;
width:100%;
}
.home a{
background:#9966CC;
color:#e0e0e0;
-webkit-border-radius:0px;
border-radius:0px;
width:100%;
}
nav ul {
-webkit-font-smoothing:antialiased;
background:#222222;
margin:0;
padding:0;
height:45px;
}
nav li {
margin:0;
padding:0;
float:none!important;
position:relative;
text-align:right;
background:#666666;
}
nav ul.main-menu li a{
color:#fff;
}
nav a {
background:none;
display:block;
font:normal 14px/50px Ubuntu;
padding:0 25px;
text-align:center;
text-decoration: none;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
li a{
color:#e0e0e0;
background:none;
}
nav li:hover a {
background:#000;
color:#e0e0e0;
}
nav li ul {
float:left;
left:0;
position:absolute;
top:35px;
visibility:hidden;
z-index:1;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
nav li:hover ul {
opacity:1;
top:50px;
visibility:visible;
}
nav li ul li {
float:none;
width:100%;
}
nav li ul a:hover {
background:#666666;
color:#fff;
}
ul.sub-menu{
width:100%;
min-width:0px;
}
ul.sub-menu li:hover{
position:relative;
background-color:#000;
color:#fff;
border:0px;
border:none;
}
}
</style>
Any helps will be great!
DEMO
html, body {
margin:0;
}
.acn-menu {
text-align: center;
background-color: rgba(0, 0, 0, 0.9);
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
min-height: 74px;
width: 100%;
}
.label_openclose {
display: none;
}
.menu-tabs {
height: 100%;
}
.menu-tabs .elem {
box-sizing: border-box;
padding: 0 20px;
float: left;
height: 100%;
line-height: 70px;
background-color: rgb(30, 30, 30);
color: white;
}
#-webkit-keyframes spin {
0% {
transform: rotate(-180deg);
}
50% {
transform: rotate(180deg);
}
100% {
transform: rotate(-180deg);
}
}
#keyframes spin {
0% {
transform: rotate(-180deg);
}
50% {
transform: rotate(180deg);
}
100% {
transform: rotate(-180deg);
}
}
.menu-check:checked ~ .label_openclose {
-webkit-animation-play-state: paused;
animation-play-state: paused;
}
.menu-check {
display: none;
}
.menu-tabs .elem:hover {
background-color: rgba(255, 255, 255, 0.2);
}
/*#media screen and (max-width:55%)*/
#media screen and (max-width:768px) {
.label_openclose {
-webkit-animation: spin 2s;
animation: spin 2s;
display: inline-block;
transform: rotate(-180deg);
transition-duration: 1s;
margin: 10px;
width: 30px;
height: 30px;
border-radius: 50%;
border-top: 10px solid rgb(50, 50, 50);
border-right: 10px solid rgb(100, 100, 100);
border-bottom: 10px solid rgb(150, 150, 150);
border-left: 10px solid rgb(200, 200, 200);
background-color: transparent;
cursor: pointer;
}
.label_openclose:hover {
transform: rotate(180deg);
}
.menu-tabs .elem {
transition: border 1s linear, height 1s;
line-height: initial;
float: initial;
height: 0px;
cursor: pointer;
border-top: 0px solid #000;
overflow: hidden;
}
.menu-tabs:hover .elem {
height: 25px;
}
.menu-check:checked ~ .menu-tabs .elem {
height: 25px;
color: white;
border-top: 2px solid rgba(255, 255, 255, 0.2);
}
.label_openclose:hover ~ .menu-tabs .elem {
border-top: 2px solid rgba(255, 255, 255, 0.2);
height: 25px;
}
}
<div class="acn-menu">
<input type="checkbox" id="openclose" class="menu-check" />
<label class="label_openclose" for="openclose"></label>
<div class="menu-tabs">
<div class="elem">test</div>
<div class="elem">nav</div>
<div class="elem">bar</div>
<div class="elem">with</div>
<div class="elem">transitions</div>
</div>
</div>
<main>
test content of main page
</main>
Animated menu
When the browser resize less then 768 and 480 or (55%), the animated circle menu appears
This i have done with a media query in css: #media screen and (max-width:768px) and setting an animation:
After that, on hover (), the animated circle menu runs again.
This is done with an transform: rotate(180deg); inside an :hover statement.
When user click or touch the animated circle menu, the animated circle menu stops and the dropdown menu appears and push the content below it with no scrollbar at the same time as the animated circle rolls back and stops.
The click is done with an input type="checkbox" element. This is for a special css pseudo selector :checked. This lets us change the style of an :checked. What we do is combine it with an sibling selector so
#input:checked ~ .sibling. Now we can style .sibling while we click on the checkbox. In addition to this added a label for the checkbox. label for="#ID" And hide the actual checkbox with display:none;
Rolling back the circle is done with transform: rotate(180deg);.
Browser support should be ok but, I haven't added all the prefixes for all the transforms and animations.
Transition and animation is CSS3 so IE9 doesn't support it.
Should work in IE10 and above.(probably missing -ms- prefixes)
Tested in Chrome 40.0.
DEMO
Please Try This CSS and your html
<style>
.input-acn-search{
border:1px solid #979797;
padding:7px 34px 7px 7px;
font-size:14px;
font-weight:400;
color:#111;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px;
margin:7px 0px 0px 10px;
}
.btn-search{
background:#006666;
color:#fff;
border:0px;
font-size:18px;
margin:0px 0px 0px -30px;
-webkit-border-radius:17px;
-moz-border-radius:17px;
border-radius:17px;
border:0px;
min-width:5%;
}
.input-acn-search:hover{
background:#fff;
border:1px solid #979797;
}
.input-acn-search placeholder{
color:#666666;
}
.acn-title{
margin:0px;
height:45px;
padding:0px 25px 0px 25px;
background:#FF9900;
line-height:normal;
vertical-align:middle;
display:table-cell!important;
}
.menu-container{
width:100%;
margin:0px;
height:45px;
padding:0px;
background:#222222;
line-height:normal;
vertical-align:middle;
display:table-cell!important;
}
.acn-title a,.acn-title a h1{
color:#FFFFFF;
font-size:19px;
font-weight:500;
font-style:normal;
font-size-adjust:inherit;
}
.acn-title a:hover,.acn-title a:hover h1{
color:#999;
}
#acn-border{
position:absolute;
width:20px;
height:20px;
border-top:17px solid transparent;
border-left:21px solid #FF9900;
border-bottom:17px solid transparent;
display:table-cell;
margin-top:7px;
margin-left:140px;
z-index:1;
}
ul,li,ul li{
list-style:none;
list-style-image:none;
background:none;
}
/*------menu-------*/
nav ul.main-menu li a{
color:#fff;
}
.home a{
background:#9966CC;
color:#e0e0e0;
-webkit-border-radius:0px 37px 37px 0px;
border-radius:0px 37px 37px 0px;
}
nav ul {
-webkit-font-smoothing:antialiased;
background:#222222;
margin:0;
padding:0;
height:45px;
}
nav li {
float:left;
margin:0;
padding:0;
position:relative;
min-width:110px;
}
nav a {
background:none;
display:block;
font:normal 14px/50px Ubuntu;
padding:0 25px;
text-align:center;
text-decoration: none;
}
li a{
color:#e0e0e0;
background:none;
}
nav li:hover a {
background:#000;
color:#e0e0e0;
}
nav li ul {
float:left;
left:0;
opacity:0.5;
position:absolute;
top:35px;
visibility:hidden;
z-index:1;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
nav li:hover ul {
opacity:1;
top:50px;
visibility:visible;
}
nav li ul li {
float:none;
width:100%;
}
nav li ul a:hover {
background:#666666;
color:#fff;
}
ul.sub-menu{
min-width:180px;
max-width:100%;
}
ul.sub-menu li:hover{
background-color:#000;
color:#fff;
border:0px;
border:none;
}
#media screen and (max-width:55%){/*bila screen maksimum 55% atau sama dengan #bingkai-mini*/}
#media screen and (max-width:768px) {
.acn-menu{
display:block;
visibility:visible;
width:26px;
height:26px;
margin-top:0px;
margin-right:17px;
margin-left:17px;
background:none;
border:10px inset #428BCA;
-webkit-transform:rotate(-180deg);
-moz-transform:rotate(-180deg);
-o-transform:rotate(-180deg);
transform:rotate(-180deg);
-webkit-transition-duration:2s;
-moz-transition-duration:2s;
-o-transition-duration:2s;
transition-duration:2s;
-webkit-border-radius:50%!important;
-moz-border-radius:50%!important;
-o-border-radius:50%!important;
border-radius:50%!important;
}
.menu-container .acn-menu:hover{
cursor:pointer;
display:block;
visibility:visible;
margin-right:17px;
margin-left:17px;
background:none;
border:10px inset #FF00FF;
-webkit-transform:rotate(180deg);
-moz-transform:rotate(180deg);
-o-transform:rotate(180deg);
transform:rotate(180deg);
-webkit-transition-duration:2s;
-moz-transition-duration:2s;
-o-transition-duration:2s;
transition-duration:2s;
}
.acn-title{
width:100%;
-webkit-border-radius:0px;
border-radius:0px;
position:relative;
}
.acn-border{
display:none;
}
.main-menu {
max-height: 0px;
overflow:hidden;
height: 250px;
transition: max-height 1s;
}
.menu-container:hover .main-menu {
max-height: 250px;
overflow: visible;
}
#acn-border {
margin-left: 50%;
}
/*---------------MENU------------------*/
header{
position:relative;
}
nav{
position:absolute;
right:0px;
top:47px;
width:100%;
}
.home a{
background:#9966CC;
color:#e0e0e0;
-webkit-border-radius:0px;
border-radius:0px;
width:100%;
}
nav ul {
-webkit-font-smoothing:antialiased;
background:#222222;
margin:0;
padding:0;
height:45px;
}
nav li {
margin:0;
padding:0;
float:none!important;
position:relative;
text-align:right;
background:#666666;
}
nav ul.main-menu li a{
color:#fff;
}
nav a {
background:none;
display:block;
font:normal 14px/50px Ubuntu;
padding:0 25px;
text-align:center;
text-decoration: none;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
li a{
color:#e0e0e0;
background:none;
}
nav li:hover a {
background:#000;
color:#e0e0e0;
}
nav li ul {
float:left;
left:0;
position:absolute;
top:35px;
visibility:hidden;
z-index:1;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
-o-transition: all .5s ease;
transition: all .5s ease;
}
nav li:hover ul {
opacity:1;
top:50px;
visibility:visible;
}
nav li ul li {
float:none;
width:100%;
}
nav li ul a:hover {
background:#666666;
color:#fff;
}
ul.sub-menu{
width:100%;
min-width:0px;
}
ul.sub-menu li:hover{
position:relative;
background-color:#000;
color:#fff;
border:0px;
border:none;
}
}
</style>
It's not necessary to not use javascript due that most peaple always have it enabled, and it has awesome functionalities.
Said the above i found an example on how to help you here: link
There you can find two options, the target pseudo-selector and a CSS3 selector trickery.
hope it helps :3

css div liquidlike/autoadjust size

I want to make the container height be auto adjust if the contents overflow it will just go to the flow.
This is the code I have. site: Here
Just forget about the html and focus on css only the css is the one I got error.
.game_wrapper {
width:210px;
height:auto;
position:relative;
background:#fafafa;
background:url(bg1.png);
border:1px dashed #7f7f7f;
padding:3px;
}
.game_container {
width:90px;
height:85px;
border:1px solid #fff;
float:left;
margin:3px;
text-align:center;
-moz-box-shadow: 0px 0px 1px #000000;
-webkit-box-shadow: 0px 0px 1px #000000;
box-shadow: 0px 0px 1px #000000;
border-radius:1px;
padding:3px;
transition: all .2s;
-webkit-transition: all .2s;
-moz-transition: all .2s;
-o-transition: all .2s;
position:relative;
background:url(background.jpg);
background-size:100%;
}
.game_container:hover {
border:1px solid #c0c0c0;
}
.game_container img {
width:100%;
height:70px;
-webkit-filter: brightness(110%);
padding-bottom:3px;
border-bottom:1px solid #afafaf;
transition: all .2s;
-webkit-transition: all .2s;
-moz-transition: all .2s;
-o-transition: all .2s;
background:url(bg2.png);
}
.game_container:hover img {
-webkit-filter: brightness(120%);
}
.game_container .name {
font-size:10px;
color:#0f5f5f;
background:url(bg1.png);
}
.game_container:hover .name {
color:#949400;
font-size:12px;
}
.game_container a:link, .game_container a:visited {
text-decoration:none;
}
.game_container .info {
box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
border:1px solid #a0a0a0;
text-align:justify;
background:#01a2ff;
border-color: #ddd;
position:absolute;
font-family:Verdana,Geneva,sans-serif;
font-size:12px;
color:#E0F7FC;
height:120px;
display:none;
padding:10px;
width:220px;
left:110%;
top:0px;
z-index:1;
}
.game_container .info:before {
content:'';
position:absolute;
left:-6px;
top:15px;
z-index:2;
border-bottom:1px solid #a0a0a0;
border-left:1px solid #a0a0a0;
box-shadow-bottom: inset 0 1px 2px rgba(0,0,0,.07);
box-shadow-left: inset 0 1px 2px rgba(0,0,0,.07);
background:#01a2ff;
height:10px;
width:10px;
display:block;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
}
.game_container:hover .info {
display:block;
}
.game_container .info:hover {
transition: all 0s;
-webkit-transition: all 0s;
-moz-transition: all 0s;
-o-transition: all 0s;
display:none;
}
.game_container .title {
font-size:14px;
color:#E0F7FC;
}
.game_container .description {
margin-top:5px;
color:#F2F9FE;
font-family:Arial;
font-size:10px;
}
Your Example Fixed
you need clearfix to the main wrapper
.clearfix:before, .clearfix:after { content:""; display:table; }
.clearfix:after { clear:both; }
/* IE 6/7 */
.clearfix{ zoom:1; }
add the class .clearfix the the main wrapper
<div class="clearfix game_wrapper">
More abouts clearfix
http://www.sitepoint.com/clearing-floats-overview-different-clearfix-methods/
DEMO
Simply add the overflow:auto; to .game-wrapper
.game_wrapper {
width:210px;
height:auto;
position:relative;
background:#fafafa;
background:url(bg1.png);
border:1px dashed #7f7f7f;
padding:3px;
overflow:auto;
}

Keeping a div absolute but also in its parent

I have a small link with a thumbnail and an excerpt, using css transitions I want the thumbnail to fade out on hover and the excerpt to appear. I'm using % in oppose to pixels as I want my website responsive, however when I add this to my site the excerpt is spread out the width of the page as it has absolute positioning, below is a jfiddle, could anyone help me?
.col {
width:29%;
margin:0 auto;
}
.post-thumbnail {
position:relative;
float:left;
overflow:auto;
width:100%; height:278px;
background:#2F3B45;
}
.post-thumbnail img {
width:100%; height:223px;
padding:0; margin:0;
transition:opacity 0.3s ease-in-out;
-moz-transition:opacity 0.3s ease-in-out;
-webkit-transition:opacity 0.3s ease-in-out;
-o-transition:opacity 0.3s ease-in-out;
}
.col:hover .post-thumbnail img {
opacity:0;
filter:alpha(opacity=00);
}
.post-excerpt {
width:100%;
z-index:9999;
opacity:1;
filter:alpha(opacity=1);
}
.post-excerpt p {
text-align:justify;
color:#a3aaac;
font-family:'Open Sans', helvetica, arial, sans-serif;
font-size:9pt; font-weight:200;
line-height:18pt;
text-decoration:none; width:100%;
}
.col:hover .post-excerpt {
opacity:1;
filter:alpha(opacity=1);
}
.post-title {
position:absolute;
bottom:0px; left:0px;
width:100%; height:55px;
background:#ff0000; z-index:9999;
text-align:center; line-height:52px;
}
.post-title a {
font-family:'Open Sans', helvetica, arial, sans-serif;
font-size:10pt; font-weight:200;
color:#000; text-decoration:none;
}
.post-more {
position:absolute;
bottom:0px; left:0px;
width:100%; height:0px;
background:#ff0000;
opacity:0.0;
filter:alpha(opacity=00);
}
.col:hover .post-title {
cursor:pointer;
position:absolute;
bottom:0px; left:0px;
width:100%; height:95px;
background:#ff0000; line-height:44px;
}
.col:hover .post-more {
cursor:pointer;
position:absolute;
bottom:0px; left:0px;
width:100%; height:47px;
background:#fff url(http://liamhodnett.com/img/new/read-entry.png)top left no-repeat;
z-index:99999;
}
http://jsfiddle.net/P3k9A/
Thanks guys!
Set the parent to relative, then set the children to absolute.
Here are the ones I changed:
.col {
width:29%;
margin:0 auto;
position:relative; /* <- here */
}
.post-thumbnail {
position:absolute; /* <- here */
top: 0px;
float:left;
overflow:auto;
width:100%; height:278px;
background:#2F3B45;
}
.post-excerpt {
position: absolute; /* <- here */
width:100%;
z-index:9999;
opacity:0;
filter:alpha(opacity=0);
}
I believe this is what you were after: http://jsfiddle.net/P3k9A/1/
(I also changed the opacity to 0 on the excerpt in the fiddle).