Drop down menu under slide show - html

I have drop down menu which use css for acting like menu :-
#primary_nav_wrap
{
background:url("../img/footer_lodyas.png")no-repeat center center fixed;
display:inline-block;
width:800px;
}
#primary_nav_wrap ul
{
list-style:none;
position:relative;
margin:0;
padding:0
}
#primary_nav_wrap ul a
{
display:block;
color:black;
text-decoration:none;
font-weight:bold;
font-size:15px;
line-height:50px;
padding:0 15px;
font-family:yekan,montserratAltenates;
}
#primary_nav_wrap ul li
{
position:relative;
display:inline-block;
float:right;
margin:0;
padding:0
}
#primary_nav_wrap ul li.current-menu-item
{
background:#ddd
}
#primary_nav_wrap ul li:hover
{
background:rgba(255, 153, 0, 0.7);
}
#primary_nav_wrap ul ul
{
display:none;
position:absolute;
top:100%;
left:0;
background:#fff;
padding:0
}
#primary_nav_wrap ul ul li
{
width:200px
}
#primary_nav_wrap ul ul a
{
line-height:120%;
padding:10px 15px
}
#primary_nav_wrap ul ul ul
{
top:0;
left:100%
}
#primary_nav_wrap ul li:hover > ul
{
display:block
}
.slidshow_container{
max-width:800px;
position:relative;
margin:0;
padding:0;
}
.mySlides{
position:relative;
margin:0;
padding:0;
}
.numbertext{
font-family:yekan,montserratAltenates;
font-size:15px;
position:absolute;
padding:10px;
color:white;
}
.prev,.next{
cursor:pointer;
position:absolute;
padding:10px;
color:white;
margin:auto;
top:150px;
font-size:30px;
border-radius:0px 3px 3px 0px;
}
.next:hover{
background:rgba(40,40,40,0.8);
border-radius:3px 0px 0px 3px;
}
.prev:hover{
background:rgba(40,40,40,0.8);
}
.next{
right:0;
}
.mySlides .text{
font-family:yekan,montserratAltenates;
font-size:15px;
position:absolute;
bottom:0px;
padding:20px;
margin-bottom:5px;
width:800px;
text-align:center;
color:white;
background:rgba(35, 35, 35, 0.60);
overflow:hidden;
}
<nav id="primary_nav_wrap">
<ul>
<li class="current-menu-item">Home</li>
<li>
Category
<ul>
<li>Sub Menu 1</li>
<li>Sub Menu 2</li>
<li>Sub Menu 3</li>
<li>Sub Menu 5</li>
</ul>
</li>
<li>
Contact us
</li>
<li>
About us
</li>
</ul>
</nav>
<br style="clear:both;" />
<div class="slidshow_container">
<div class="mySlides fade">
<div class="numbertext">1 / 4</div>
<img src="~/Content/img/slideshow/image_1.jpg" style="width:100%;height:400px" />
<div class="text">image 1</div>
</div>
<div class="mySlides fade">
<div class="numbertext">2 / 4</div>
<img src="~/Content/img/slideshow/image_2.jpg" style="width:100%;height:400px" />
<div class="text">image 2</div>
</div>
<div class="mySlides fade">
<div class="numbertext">3 / 4</div>
<img src="~/Content/img/slideshow/image_3.jpg" style="width:100%;height:400px" />
<div class="text">image 3</div>
</div>
<div class="mySlides fade">
<div class="numbertext">4/ 4</div>
<img src="~/Content/img/slideshow/image_4.jpg" style="width:100%;height:400px" />
<div class="text">image 4</div>
</div>
<a class="prev" onclick="plusSlides(-1)">❮</a>
<a class="next" onclick="plusSlides(1)">❯</a>
</div>
But when I move the mouse over the category menu the blow list get under the image of slide menu like image below:-
So how can I solve this problem ?

z-index will fix your problem,
The z-index property specifies the stack order of an element.
An element with greater stack order is always in front of an element
with a lower stack order.
Note: z-index ONLY works on positioned elements (position:absolute,
position:relative, or position:fixed).
Syntax :
z-index: auto|number|initial|inherit;
Initial value: auto
Applies to positioned elements
Inherited no
https://developer.mozilla.org/en/docs/Web/CSS/z-index
#primary_nav_wrap
{
background:url("../img/footer_lodyas.png")no-repeat center center fixed;
display:inline-block;
width:800px;
}
#primary_nav_wrap ul
{
list-style:none;
position:relative;
margin:0;
padding:0
}
#primary_nav_wrap ul a
{
display:block;
color:black;
text-decoration:none;
font-weight:bold;
font-size:15px;
line-height:50px;
padding:0 15px;
font-family:yekan,montserratAltenates;
}
#primary_nav_wrap ul li
{
position:relative;
display:inline-block;
float:right;
margin:0;
padding:0
}
#primary_nav_wrap ul li.current-menu-item
{
background:#ddd
}
#primary_nav_wrap ul li:hover
{
background:rgba(255, 153, 0, 0.7);
}
#primary_nav_wrap ul ul
{
display:none;
position:absolute;
top:100%;
left:0;
background:#fff;
padding:0;
/* Here Put z-index*/
z-index:9999;
}
#primary_nav_wrap ul ul li
{
width:200px
}
#primary_nav_wrap ul ul a
{
line-height:120%;
padding:10px 15px
}
#primary_nav_wrap ul ul ul
{
top:0;
left:100%
}
#primary_nav_wrap ul li:hover > ul
{
display:block
}
.slidshow_container{
max-width:800px;
position:relative;
margin:0;
padding:0;
}
.mySlides{
position:relative;
margin:0;
padding:0;
}
.numbertext{
font-family:yekan,montserratAltenates;
font-size:15px;
position:absolute;
padding:10px;
color:white;
}
.prev,.next{
cursor:pointer;
position:absolute;
padding:10px;
color:white;
margin:auto;
top:150px;
font-size:30px;
border-radius:0px 3px 3px 0px;
}
.next:hover{
background:rgba(40,40,40,0.8);
border-radius:3px 0px 0px 3px;
}
.prev:hover{
background:rgba(40,40,40,0.8);
}
.next{
right:0;
}
.mySlides .text{
font-family:yekan,montserratAltenates;
font-size:15px;
position:absolute;
bottom:0px;
padding:20px;
margin-bottom:5px;
width:800px;
text-align:center;
color:white;
background:rgba(35, 35, 35, 0.60);
overflow:hidden;
}
<nav id="primary_nav_wrap">
<ul>
<li class="current-menu-item">Home</li>
<li>
Category
<ul>
<li>Sub Menu 1</li>
<li>Sub Menu 2</li>
<li>Sub Menu 3</li>
<li>Sub Menu 5</li>
</ul>
</li>
<li>
Contact us
</li>
<li>
About us
</li>
</ul>
</nav>
<br style="clear:both;" />
<div class="slidshow_container">
<div class="mySlides fade">
<div class="numbertext">1 / 4</div>
<img src="~/Content/img/slideshow/image_1.jpg" style="width:100%;height:400px" />
<div class="text">image 1</div>
</div>
<div class="mySlides fade">
<div class="numbertext">2 / 4</div>
<img src="~/Content/img/slideshow/image_2.jpg" style="width:100%;height:400px" />
<div class="text">image 2</div>
</div>
<div class="mySlides fade">
<div class="numbertext">3 / 4</div>
<img src="~/Content/img/slideshow/image_3.jpg" style="width:100%;height:400px" />
<div class="text">image 3</div>
</div>
<div class="mySlides fade">
<div class="numbertext">4/ 4</div>
<img src="~/Content/img/slideshow/image_4.jpg" style="width:100%;height:400px" />
<div class="text">image 4</div>
</div>
<a class="prev" onclick="plusSlides(-1)">❮</a>
<a class="next" onclick="plusSlides(1)">❯</a>
</div>

Related

Dropdown menu(ul li kind) not working in ie

I am trying to do a cross browser compatible drop down menu that is in this site:
jsfiddle.net
(check tags with id listdelete in thehtml/css file and javascript is for other purposes)
But my problem is that this version with the ul tags setted as "primary menu" works perfectly on chrome/firefox but it's not gonna work on ie because(i don't know why) the menu is not popping up.
i have tried to change the first #listdelete tags into the leftcont div to a tags and the menus pop up but links are not going to work(i guess that is because the links witch are a tags do not work in the list because the primary list is an a tag itself)
For anithing just ask in comments
HTML:
<div id="wrapperlink">
<ul>
<li><a id="temple"href="storia.html"/></a></li>
<li><a id="gallery"href="gallery.html"/></a></li>
<li><a id="play"href="video.html"/></a></li>
<li><a id="info"href="info.html"/></a></li>
</ul>
</div>
</div>
<div id="container">
<div id="leftcont">
<div class="wrapcont">
<div style="text-align:center;font-size:1.3em;"><b>Componenti aereo</b></div>
<ul class="listdelete">
<li>
<span><b>ALI</b></span>
<ul class="listdelete">
<li class="middle">
<b>Disegni</b>
</li>
<li class="middle">
<b>Componenti</b>
</li>
<li class="middle">
<b>Lavori</b>
</li>
</ul>
</li>
</ul>
<ul class="listdelete">
<li>
<span><b>CARRELLO</b></span>
<ul class="listdelete">
<li class="middle">
<b>Disegni</b>
</li>
<li class="middle">
<b>Componenti</b>
</li>
<li class="middle">
<b>Lavori</b>
</li>
</ul>
</li>
</ul>
<ul class="listdelete">
<li>
<span class="spanwidth"><b> CRUSCOTTO</b> </span>
<ul class="listdelete">
<li class="middle">
<b>Disegni</b>
</li>
<li class="middle">
<b>Componenti</b>
</li>
<li class="middle">
<b>Lavori</b>
</li>
</ul>
</li>
</ul>
<ul class="listdelete">
<li>
<span><b> ELICA</b></span>
<ul class="listdelete">
<li class="middle">
<b>Disegni</b>
</li>
<li class="middle">
<b>Componenti</b>
</li>
<li class="middle">
<b>Lavori</b>
</li>
</ul>
</li>
</ul>
<ul class="listdelete">
<li>
<span> <b>FUSOLIERA</b> </span>
<ul class="listdelete">
<li class="middle">
Disegni
</li>
<li class="middle">
<b>Componenti</b>
</li>
<li class="middle">
<b>Lavori</b>
</li>
</ul>
</li>
</ul>
<ul class="listdelete">
<li>
<span><b>LONGHERONE</b> </span>
<ul class="listdelete">
<li class="middle">
<a>Disegni</a>
</li>
<li class="middle">
<a>Componenti</a>
</li>
<li class="middle">
Lavori
</li>
</ul>
</li>
</ul>
<ul class="listdelete">
<li>
<span> <b>MOTORE</b> </span>
<ul class="listdelete">
<li class="middle">
<b>Disegni</b>
</li>
<li class="middle">
<b>Componenti</b>
</li>
<li class="middle">
<b>Lavori</b>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="centercontpos">
<div id="centercont">
<div class="wrapcont">
<div id="desc">
<div style="text-align:center;width:100%; height:auto; font-size:1.3em;font-family:Lucida Sans Unicode;"><b></b> </div><br>
<div style="text-align:center;width:100%;height:auto;font-size:1.1em; font-family:Lucida Sans Unicode;"></div>
<br>
</div>
<div id="pusher1">
</div>
<div id="pic1">
<div id="slider">
<img id="1"style="border-radius: 18px;width:100%;height:100%;" src="../immagini/slide1.jpg" border="0"style="width:100%;height:100%;"/>
<img id="2"style="border-radius: 18px;width:100%;height:100%;" src="../immagini/slide2.jpg" border="0"style="width:100%;height:100%;"/>
<img id="3"style="border-radius: 18px;width:100%;height:100%;" src="../immagini/slide3.jpg" border="0"style="width:100%;height:100%;"/>
<img id="4"style="border-radius: 18px;width:100%;height:100%;" src="../immagini/slide4.jpg" border="0"style="width:100%;height:100%;"/>
<img id="5"style="border-radius: 18px;width:100%;height:100%;" src="../immagini/slide5.jpg" border="0"style="width:100%;height:100%;"/>
</div>
</div>
</div>
</div>
</div>
<div id="rightcont">
<div class="wrapcont">
<div id="lastarticlepos">
<div id="lastarticlediv">
<div style="border-bottom:1px solid black;">
<b>ULTIMI ARTICOLI</b>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
</div>
</body>
</html>
CSS:
body{
background-image:url("../immagini/polaroid.jpg");
background-size:cover;
height:100%;
width:100%;
margin:0;
padding:0;
min-width:1100px;
min-height:1000px;
}
body,html{
height:100%;width:100%;
min-width:1000px;
margin:0;
padding:0;
}
#media screen and (max-height: 900px){
#link{
position:relative;
width:100%;
height:20%;
background-color: rgba(255,246,0,0.9);
}
#wrapperlink{
position:relative;
width:90%;
height:90%;
margin-left:auto;
margin-right:auto;
}
#link ul{
position:absolute;
width:90%;
height:90%;
list-style:none;
margin:auto;
padding:0px;
}
#link li{
float:left;
width:4em;
height:100%;
margin-right:5%;
}
#link a{
float:left;
width:4em;
height:100%;
}
}
#logo{
position:absolute;
background-image:url("../immagini/logo.png");
width:14.563em;
height:100%;
background-size:contain;
background-repeat:no-repeat;
}
#title{
position:relative;
width:100%;
height:15%;
background-color: rgb(0,0,0);
}
#link{
position:relative;
width:100%;
height:8%;
background-image:url("../immagini/linkbg.png");
background-size:contain;
background-repeat:repeat-x;
}
#wrapperlink{
position:relative;
width:100%;
height:100%;
margin-left:auto;
margin-right:auto;
}
#link ul{
position:absolute;
width:100%;
height:100%;
list-style:none;
margin:auto;
padding:0px;
}
#link li{
float:left;
width:4em;
height:100%;
margin-right:5%;
}
#link a{
float:left;
width:4em;
height:90%;
}
#container{
position:relative;
min-width:100%;
height:85%;
background-color: rgba(136,136,136,0.9);
box-sizing:border-box;
}
#footer{
position:relative;
background-image:url("../immagini/footer.png");
width:100%;
height:20%;
background-size:cover;
background-repeat:no-repeat;
box-sizing:border-box;
bottom:0;
}
#home{
position:absolute;
background-image:url("../immagini/home1.png");
width:100%;
height:100%;
background-repeat:no-repeat;
background-size:contain;
}
#temple{
position:absolute;
background-image:url("../immagini/storia.png");
width:100%;
height:100%;
background-repeat:no-repeat;
background-size:contain;
}
#gallery{
position:absolute;
background-image:url("../immagini/gallery.png");
width:100%;
height:100%;
background-repeat:no-repeat;
background-size:contain;
}
#info{
position:absolute;
background-image:url("../immagini/info.png");
width:100%;
height:100%;
background-repeat:no-repeat;
background-size:contain;
}
#play{
position:absolute;
background-image:url("../immagini/play.png");
width:100%;
height:100%;
background-repeat:no-repeat;
background-size:contain;
}
.wrapcont{
position:relative;
width:100%;
height:100%;
}
#leftcont{
position:absolute;
border:black solid 2px;
height:100%;
width:20%;
left:0;
box-sizing:border-box;
}
#centercont{
position:absolute;
border:black solid 2px;
height:100%;
width:100%;
margin:auto;
background-color: rgba(200,80,30,0.9);
box-sizing:border-box;
}
#rightcont{
position:absolute;
border:black solid 2px;
height:100%;
width:20%;
right:0;
top:0;
box-sizing:border-box;
}
#centercontpos{
position:relative;
width:60%;
height:100%;
margin:auto;
box-sizing:border-box;
}
#engsite{
position:absolute;
top:0;
right:0;
background-image:url("../immagini/eng.png");
width:3em;
height:1.9215em;
background-size:contain;
border:2px solid grey;
}
#itasite{
position:absolute;
top:0;
right:0;
background-image:url("../immagini/itaflag.png");
width:3em;
height:1.9215em;
background-size:contain;
border:2px solid grey;
}
/*------------------------------------------------------------lateral bar opening--------------------------------*/
/*------------------------------------------------------------lateral bar opening--------------------------------*/
/*------------------------------------------------------------lateral bar opening--------------------------------*/
/*------------------------------------------------------------lateral bar opening--------------------------------*/
.listdelete{
position:relative;
list-style:none;
display:inline;
margin:0px;
padding:0px;
width:auto;
font-size:1em;
}
.listdelete>li{
text-align:center;
}
.spanwidth{
width:30px;
text-align:center;
}
.listdelete>li:hover span{
width:100%;
text-align:center;
background-color:red;
}
.listdelete>li>.listdelete>li{
display:none;
background-color:white;
width:auto;
margin:0;
height:auto;
}
.listdelete:hover li>.listdelete>li{
display:block;
background-color:white;
margin:0;
width:auto;
font-size:0.8em;
text-align:center;
}
.primo{
border-top-left-radius: 25px;
border-top-right-radius: 25px;
border-bottom:1px grey solid;
}
.ultimo{
border-bottom-left-radius: 25px;
border-bottom-right-radius: 25px;
}
.middle{
border-bottom:1px grey solid;
}
/*------------------------------------------------------------lateral bar close--------------------------------*/
/*------------------------------------------------------------lateral bar close--------------------------------*/
/*------------------------------------------------------------lateral bar close--------------------------------*/
/*------------------------------------------------------------lateral bar close--------------------------------*/
#desc{
border:black solid 2px;
border-radius: 25px;
position:relative;
width:100%;
height:auto%;
background-image:url("../immagini/descbg.png");
background-size:cover;
}
#pusher1{
position:relative;
width:100%;
height:5em;
}
#pic1{
border:black solid 2px;
border-radius: 18px;
margin:auto;
position:relative;
width:80%;
height:40%;
background-color:red;
}
.spancenter{
position:relative;
width:auto;
margin:auto;
}
#slider{
position:absolute;
width:100%;
height:100%;
overflow:hidden;
margin:0px;
}
#lastarticlepos{
position:absolute;
width:100%;
height:80%;
border:black solid 2px;
border-bottom-left-radius:20px;
border-bottom-right-radius:20px;
background-color:rgba(255,255,255,0.7);
box-sizing:border-box;
}
I think the problem is that IE doesn't understand the "hover" attribute with tag "li". It only applies to tag "a". Try to solve your problem by inserting "if ie" blocks with links instead of list elements. Here's an example (a little different task but still can help): http:// jsfiddle. net/xan9gtde/
Pay attention that the commented CSS-block must be in different CSS-file for IE only.

how to create submenu of vertical menu in html

Please help me to create sub menu of the below design. sub menu should be align into just below the list.i my design menu and sub menu seems the same.
CSS:
#vertmenu {
font-family:'Trebuchet MS';
font-size:14px;
width:250px;
margin:0 0 0 20px;
padding:0;
}
#vertmenu h1 {
display:block;
font-size:14px;
color:gray;
width:159px;
margin:0;
padding:3px 0 5px 3px;
}
#vertmenu ul {
list-style:none;
border:none;
margin:0;
padding:0;
}
#vertmenu ul li {
margin:0;
padding:0;
}
#vertmenu ul li a {
font-size:14px;
display:block;
border-bottom:1px dashed #C39C4E;
text-decoration:none;
color:#666;
width:160px;
padding:5px 0 2px 4px;
}
#vertmenu ul li a:hover,#vertmenu ul li a:focus {
color:#000;
background-color:#eee;
}
HTML Code:
<div id="vertmenu">
<h1>How to sell your images</h1>
<ul>
<li>Home
<ul>
<li>Sub Menu 1</li>
<li>Sub Menu 2</li>
</ul>
</li>
<li>About Us</li>
<li>Computing</li>
<li>Web Sites</li>
<li>Games</li>
<li>Links</li>
</ul>
</div>
and sub menu visible by default not on the click of menu.
I have tried but it is not working .
help is really appreciated.
#vertmenu {
font-family:'Trebuchet MS';
font-size:14px;
width:250px;
margin:0 0 0 20px;
padding:0;
}
#vertmenu h1 {
display:block;
font-size:14px;
color:gray;
width:159px;
margin:0;
padding:3px 0 5px 3px;
}
#vertmenu>ul {
list-style:none;
border:none;
margin:0;
padding:0;
}
#sub{
list-style: none;
}
#vertmenu ul li {
margin:0;
padding:0;
}
#vertmenu ul li a {
font-size:14px;
display:block;
border-bottom:1px dashed #C39C4E;
text-decoration:none;
color:#666;
width:160px;
padding:5px 0 2px 4px;
}
#vertmenu ul li a:hover,#vertmenu ul li a:focus {
color:#000;
background-color:#eee;
}
HTML Code:
<div id="vertmenu">
<h1>How to sell your images</h1>
<ul>
<li>Home
<ul id="sub">
<li>Sub Menu 1</li>
<li>Sub Menu 2</li>
</ul>
</li>
<li>About Us</li>
<li>Computing</li>
<li>Web Sites</li>
<li>Games</li>
<li>Links</li>
</ul>
</div>
Do you mean something like this?
Fiddle
<div id="vertmenu">
<h1>How to sell your images</h1>
<ul>
<li>Home
<ul class="children">
<li>Sub Menu 1</li>
<li>Sub Menu 2</li>
</ul>
</li>
<li>About Us</li>
<li>Computing</li>
<li>Web Sites</li>
<li>Games</li>
<li>Links</li>
</ul>
</div>
#vertmenu {
font-family:'Trebuchet MS';
font-size:14px;
width:250px;
margin:0 0 0 20px;
padding:0;
}
#vertmenu h1 {
display:block;
font-size:14px;
color:gray;
width:159px;
margin:0;
padding:3px 0 5px 3px;
}
#vertmenu ul {
list-style:none;
border:none;
margin:0;
padding:0;
}
#vertmenu ul li {
margin:0;
padding:0;
}
#vertmenu ul li a {
font-size:14px;
display:block;
border-bottom:1px dashed #C39C4E;
text-decoration:none;
color:#666;
width:160px;
padding:5px 0 2px 4px;
}
#vertmenu ul li a:hover,#vertmenu ul li a:focus {
color:#000;
background-color:#eee;
}
li:hover > .children {
display:block;
}
.children {
display:none;
}
Notice the added children class on ul and the hover event.

Center text in image and change text colour on hover

I'm trying to center text within the image and have the text change colour on hover.
However the divider between the text keeps knocking out the grid and I cant get the a:hover function to work? Thanks for helping.
This is what I am trying to achieve,
http://tinypic.com/view.php?pic=az791h&s=8#.U4i1MfldUrU
http://jsfiddle.net/pR8C4/
enter code here
<div id="gallery">
<ul>
<li>
<div class="gallery-image">
<a href=""><img src="http://lorempixel.com/output/people-q-g-320-220-1.jpg"/>
<p class="gallery-desc">top title</p>
<div class="line-separator-three"></div>
<p class="gallery-desc-bottom">bottom title</p></a>
</div>
</li>
<li>
<div class="gallery-image">
<a href=""><img src="http://lorempixel.com/output/people-q-g-320-220-1.jpg"/>
<p></p></a>
</div>
</li>
<li>
<div class="gallery-image">
<img src="http://lorempixel.com/output/people-q-g-320-220-1.jpg"/>
</div>
</li>
<li>
<div class="gallery-image">
<img src="http://lorempixel.com/output/people-q-g-320-220-1.jpg"/>
</div>
</li>
<li>
<div class="gallery-image">
<img src="http://lorempixel.com/output/people-q-g-320-220-1.jpg"/>
</div>
</li>
<li>
<div class="gallery-image">
<img src="http://lorempixel.com/output/people-q-g-320-220-1.jpg"/>
</div>
</li>
<li>
<div class="gallery-image">
<img src="http://lorempixel.com/output/people-q-g-320-220-1.jpg"/>
</div>
</li>
<li>
<div class="gallery-image">
<img src="http://lorempixel.com/output/people-q-g-320-220-1.jpg"/>
</div>
</li>
<li>
<div class="gallery-image">
<img src="http://lorempixel.com/output/people-q-g-320-220-1.jpg"/>
</div>
</li>
</ul>
</div>
enter code here
#gallery {
width:100%;
margin-right:auto;
margin-left:auto;
margin-top:45px;
position:relative;
-webkit-transform: translateZ(0);
}
#gallery ul {
list-style:none;
margin:0;
padding:0;
}
#gallery ul li {
overflow:hidden;
width: 30%;
margin:1.66%;
float:left;
}
#gallery li a {
position:relative;
display:block;
}
#gallery ul p {
position:absolute;
z-index:2;
padding-left:20%;
top:33%;
font-size:1.5em;
font-family:'avenir';
text-align:center;
}
#gallery ul a {
color:#fff;
}
.gallery li a:hover{
color:#FF8000;
}
#gallery ul img {
position: relative;
z-index:1;
width: 100%;
}
.line-separator-three{
width:50%;
margin-left:25%;
height:1px;
background:#F5F5F5;
border-bottom:1px solid #F5F5F5;
margin-top:20px;
margin-bottom:20px;
position:absolute;
z-index:3;
}
enter code here
For the :hover effect you just have to change the class-selector .gallery li a:hover into an id-selector #gallery li a:hover.

Hover on unusal nav bar (ONLY CSS)

I want to make a navigation bar. I supposed a big block would be shown when i hover a the nav bar. However, it didn't work.
This is my html code.
<div id="outerContainer">
<div id="header">
<a id="logo" href="#"><img src="#"></a>
<div id="nav">
<div class="selectors">aaa</div>
<div class="selectors">bbb</div>
<div class="selectors">ccc</div>
<div class="selectors">ddd</div>
</div>
</div>
<div id="innerContainer">
<div class="navHidden"></div>
<div class="navHidden"></div>
<div class="navHidden"></div>
<div class="navHidden"></div>
<div id="content"></div>
</div>
And, this is my css.
#nav{
position:relative;
float:left;
width:600px;
padding-left:30px;
padding-top:25px;
}
.selectors{
width:150px;
position:relative;
float:left;
margin:0;
z-index:10px;
}
.selectors:hover{border-bottom-color:silver;background-color:silver;}
.navHidden{
width:760px;
height:100px;
background-color:silver;
position:absolute;
z-index:10;
display:none;
visibility:hidden;
}
I want the web become as follow:
|.selectors |.selectors | .selectors | .selectors |
| navHidden .....(only shown when hover)......|
I can only allowed to use html and css, because this is homework.
Thanks.
Your code was adapted so now your have desired layout. But it is NOT PERFECT I did not remove excess rules. Do your homework by yourself
HTML
<div id="header">
<a id="logo" href="#"><img src="#"></a>
<div id="nav">
<div class="selectors">
aaa
<div class="navHidden">Lorem ipsum text</div>
</div>
<div class="selectors">
bbb
<div class="navHidden">Lorem ipsum text</div>
</div>
<div class="selectors">
ccc
<div class="navHidden">Lorem ipsum text</div>
</div>
<div class="selectors">
ddd
<div class="navHidden">Lorem ipsum text</div>
</div>
</div>
</div>
CSS
#nav{
position:relative;
float:left;
width:600px;
padding-left:30px;
padding-top:25px;
}
.selectors{
width:150px;
position:relative;
float:left;
margin:0;
z-index:10px;
}
.selectors:hover{
border-bottom-color:silver;
background-color:silver;
}
.navHidden{
width:760px;
height:100px;
background-color:silver;
position:absolute;
z-index:10;
display:none;
top: 100%;
left: 0;
}
.selectors:hover .navHidden {display: block;}
Try this way to create your navigation.
<style>
ul, li {list-style: none; padding: 0; margin: 0; float: left;}
li a{display: block; width: 100px; height: 40px;}
li a:hover{display: block; width: 100px; height: 40px; background: red;}
li ul {display: none;}
li:hover ul {display: block;}
</style>
</head>
<ul id="nav">
<li class="selectors">aaa</li>
<li class="selectors">bbbb
<ul id="innerContainer">
<li class="navHidden">222</li>
</li>
</ul>
</li>
</ul>

footer implementation in fluid layout

I'm having problem in implementing the footer for my website.
I have taken two <ul> lists in the inner_footer as you can see in the code below. But as I zoom in, the <ul> list in the div element is not visible. It seems a float problem, but I'm not able to figure out what's wrong with it.
HTML:
<div class="grid_16">
<div class="footer">
<div class="inner_footer">
<ul>
<li>Some content</li>
</ul>
<div>
<ul>
<li><a>Link 1</a></li>
<li><a>Link 2</a></li>
<li><a>Link 3</a></li>
<li><a>Link 4</a></li>
<li><a>Link 5</a></li>
<li>Copyrights</li>
</ul>
</div>
</div>
</div>
CSS:
.footer {
height:105px;
position:relative;
top:0;
width:100%;
}
.inner_footer {
background:url(../images/layout_img/nav.jpg) 0 center repeat-x;
font-size:12px;
border-radius:4px;
position:relative;
width:inherit;
height:31px;
margin:0 auto;
}
.inner_footer ul {
margin:0;
}
.inner_footer ul li {
color:#FFF;
font-family:calibri;
font-size:13px;
list-style-type:none;
line-height:31px;
text-decoration:none;
padding:0 10px;
}
.inner_footer ul li a img {
margin:2px 0 0 20px;
}
.inner_footer ul li a {
color:#FFF;
float:left;
font-family:calibri;
font-size:13px;
list-style-type:none;
line-height:31px;
text-decoration:none;
padding:0 10px;
}
.inner_footer div {
float:right;
}
.inner_footer div ul li a {
color:#FFF;
float:left;
font-family:calibri;
font-size:13px;
list-style-type:none;
line-height:31px;
text-decoration:none;
padding:0 10px;
}
.inner_footer div ul li {
color:#FFF;
float:left;
font-family:calibri;
font-size:13px;
list-style-type:none;
line-height:31px;
text-decoration:none;
padding:0 10px;
}
I believe the problem is in your html code. You forgot to close a div element. The code should become:
<div class="grid_16">
<div class="footer">
<div class="inner_footer">
<ul>
<li>Some content</li>
</ul>
</div>
<div>
<ul>
<li><a>Link 1</a></li>
<li><a>Link 2</a></li>
<li><a>Link 3</a></li>
<li><a>Link 4</a></li>
<li><a>Link 5</a></li>
<li>Copyrights</li>
</ul>
</div>
</div>
</div>