DJRobThaMan
03-23-2006, 11:50 PM
Hi,
I wasn't sure whether to put this in the HTML forum or this one but I'm pretty sure the problem I'm having is CSS related.
I have a series of divs set to display within a larger div. This is actually a progress bar to show your position in an album of images and the number of divs with a background colour that is displayed depends on where you are in the album (all php outputted).
I'm having a bit of a problem with it though. When you add up the percentage values I have for all the divs, they sum to 100, but the smaller divs do not span all of the larger div.
Also, (in IE this is a non-issue... for once I'm not pulling my hair out because IE is my major problem... feels kinda strange) there is a space (i think it's about 1 pixel wide between the 2nd and 3rd divs and the 4th and 5th div.
(In this case there are 7 divs but this is all variable depending on how many images there are in the album. This album I'm currently working with only has 7 images in it)
Here is a snippet of the code for the progress bar (also includes the left and right arrows)
<div style=" width: 409px; margin: auto; margin-top: 5px;">
<div style="float: left; width: 30px;">
<a href="?section=stills&album=1&image=6"><img alt="" title="View the previous image" src="../images/arrowLeft.jpg"></a>
</div>
<div title=" (7out of7)" style="float: left; width: 339px; height: 4px; margin-left: 5px; margin-top: 8px; border: 1px solid #999999;">
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 16%; background-color: #999999;">
<div class="space"></div>
</div>
</div>
<div style="float: right; width: 30px;">
<a href="?section=stills&album=1&image=7"><img alt="" title="View the next image" src="../images/arrowRight.jpg"></a>
</div>
</div>
and below is the code in context.
Thanks a lot,
Douglas
I wasn't sure whether to put this in the HTML forum or this one but I'm pretty sure the problem I'm having is CSS related.
I have a series of divs set to display within a larger div. This is actually a progress bar to show your position in an album of images and the number of divs with a background colour that is displayed depends on where you are in the album (all php outputted).
I'm having a bit of a problem with it though. When you add up the percentage values I have for all the divs, they sum to 100, but the smaller divs do not span all of the larger div.
Also, (in IE this is a non-issue... for once I'm not pulling my hair out because IE is my major problem... feels kinda strange) there is a space (i think it's about 1 pixel wide between the 2nd and 3rd divs and the 4th and 5th div.
(In this case there are 7 divs but this is all variable depending on how many images there are in the album. This album I'm currently working with only has 7 images in it)
Here is a snippet of the code for the progress bar (also includes the left and right arrows)
<div style=" width: 409px; margin: auto; margin-top: 5px;">
<div style="float: left; width: 30px;">
<a href="?section=stills&album=1&image=6"><img alt="" title="View the previous image" src="../images/arrowLeft.jpg"></a>
</div>
<div title=" (7out of7)" style="float: left; width: 339px; height: 4px; margin-left: 5px; margin-top: 8px; border: 1px solid #999999;">
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 14%; background-color: #999999;">
<div class="space"></div>
</div>
<div style="float: left; height: 100%; width: 16%; background-color: #999999;">
<div class="space"></div>
</div>
</div>
<div style="float: right; width: 30px;">
<a href="?section=stills&album=1&image=7"><img alt="" title="View the next image" src="../images/arrowRight.jpg"></a>
</div>
</div>
and below is the code in context.
Thanks a lot,
Douglas