I have been losing much sleep over this problem for months.
I am trying to create a resizable container which holds a series of thumbnail-sized inline graphics which float and wraps to the left, no matter what size the viewport is resized to.
The problem I am facing is that whenever the resized viewport does not exactly fit a full graphic, there is an empty gap (margin) on the right side of the viewport. This however does not happen when the empty space can fit a graphic's width.
What I need is for the right frame edge of the viewport to bealways touching the right side of the inline block of graphics.
A sample of my code is as follows:-
<html>
<head>
<style type="text/css">
.celldiv {
display:table;
width:200px;
height:50px;
float:left;}
.cellspan {
display: table-cell;
vertical-align: middle;
text-align: center;
line-height:11px;}
</style>
</head>
<body>
<div id="container">
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
<div class="celldiv"><span class="cellspan"><b>Reserved</b></span></div>
</div>
</body>
</html>
Is there any way to achieve the desired result? Hope someone can help me out on this. Many thanks in advance.



Reply With Quote



Bookmarks