3
I have a vertical gallery and I would like to lay it horizontal, as I do it?
#gallery {
padding:0;
margin:0;
list-style-type:none;
overflow:hidden;
width:320px;
height:425px;
border:1px solid #888;
background:#ffffff;
}
#gallery li {
float:left;
}
#gallery li a {
display:block;
height:30px;
width:320px;
float:left;
text-decoration:none;
border-bottom:1px solid #fff;
cursor:default;
}
#gallery li a img {
width:320px;
height:30px;
border:0;
}
#gallery li a:hover {
background:#eee;
height:239px;
}
#gallery li a:hover img {
height:239px;
}
<div>
<ul id="gallery">
<li><a href="vida.html"><img src="imagens/Pessoa/Galeria/ferandomae.png"></a></li>
<li><a href="vida.html"><img src="imagens/Pessoa/Galeria/187.png"></a></li>
<li><a href="vida.html"><img src="imagens/Pessoa/Galeria/pessoa-10-anos.jpg"></a></li>
<li><a href="vida.html"><img src="imagens/Pessoa/Galeria/Pessoa_1894.gif"></a></li>
</ul>
</div>
Post your HTML too
– Lucas
Your code is weird. You set a small height and width for the
#gallery
and even set asoverflow: hidden;
... The#gallery
shouldn’t bewidth: 100%; height: auto;
?– Oeslei
What have you tried? In the American Ovreflow Stack have a dozen of these questions.
– Ricardo Souza
You can add in
#gallery li {display:inline}
and take out thedisplay:block #gallery li a
, It won’t get 100% yet but... I think it should be something like that you’d like, wouldn’t you? I’d take the :Hover to enlarge the image and make events. on('click') jquery to open in a modal the larger image... I think it would bring a better user experience;– Rafael Withoeft
@Rafael Withoeft Put here the code you would change.
– Catarina Silvestre
@Catarinasilvestre you use bootstrap?
– Rafael Withoeft
@Catarinasilvestre do you really need to increase the image by hovering the mouse? and this link there in the tag a, would represent the album something like that? could be taken out and placed elsewhere for example?
– Rafael Withoeft
Use #Gallerry ul li{display:inline; float:left}
– ndroid