learning_brain
New Member
- Messages
- 206
- Reaction score
- 1
- Points
- 0
I have tried everything here with little success.
I'm trying to center a bunch of float-left thumbnails in a liquid layout.
The thumbnail + span description underneath - all wrapped in a link. HTML as below.
My current css (stripped down) is..
This would be relatively simple with a fixed width layout but I want to keep it liquid.
Any ideas?
I'm trying to center a bunch of float-left thumbnails in a liquid layout.
The thumbnail + span description underneath - all wrapped in a link. HTML as below.
Code:
<body>[INDENT]<div id="wrapper">[/INDENT]
[INDENT=2]<div class="thumbscontainer">[/INDENT]
[INDENT=3]loop repeat....
<a class="thumbnail" href="..whatever">
[/INDENT]
[INDENT=4]<img src="..whatever">
<span>[/INDENT]
[INDENT=5]Description
[/INDENT]
[INDENT=4]</span>[/INDENT]
[INDENT=3]</a>
...end loop
[/INDENT]
[INDENT=2]</div>
[/INDENT]
[INDENT]</div>
[/INDENT]
</body>
My current css (stripped down) is..
Code:
html{
width: 100%;
}
body{
margin: 0px;
width: 100%;
}
#wrapper{
width: 98%;
padding: 10px;
text-align:center;
}
.thumbscontainer{
display:inline-block;
position:relative;
width:inherit;
margin-left: auto;
margin-right: auto;
text-align:center;
}
a.thumbnail{
position:relative;
float: left;
text-align:center;
height: 80px;
width: 110px;
margin: 0px 5px 5px 0px;
padding: 10px;
border: 1px outset #fff;
}
a.thumbnail img{
height:78px;
width:111px;
}
This would be relatively simple with a fixed width layout but I want to keep it liquid.
Any ideas?