Forum Moderators: not2easy

Message Too Old, No Replies

Unordered list issue

Trying to make a fully CSS photo gallery

         

geoffalan

7:55 pm on Sep 2, 2007 (gmt 0)

10+ Year Member



so, I'm trying to make my photo galleries fully CSS and I almost have it ready. The only issue I am having is the UL i am using doesn't effect any of the content around it, so I have the list's width at 75% and so it moves accordingly with the page but it basically floats over the content (the footer) I don't want to give it a definite height value, because that wouldn't work with the %'s

Is there anyway to have the UL push the footer and any other consequential content down (or up) as the browser window size changes?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The CSS - >
.holder {
width:75%;
margin:0px auto;
background-image:url(../../images/thumbnails-bg.png);
background-position:top;
background-repeat:repeat-x;
}
.thumbnailul {
padding:10px auto;
}
.thumb-small {
width:160px;
height:160px;
display:block;
float:left;
background-repeat:no-repeat;
background-position:center;
}

The HTML ->
<div class="holder">
<ul class="thumbnailul">
<li class="thumb-small thumb1"><a href="pictures/1.jpg" rel="lightbox[group]"></a></li>
<li class="thumb-small thumb2"><a href="pictures/2.jpg" rel="lightbox[group]"></a></li>
<li class="thumb-small thumb3"><a href="pictures/3.jpg" rel="lightbox[group]"></a></li>
<li class="thumb-small thumb4"><a href="pictures/4.jpg" rel="lightbox[group]"></a></li>
<li class="thumb-small thumb5"><a href="pictures/5.jpg" rel="lightbox[group]"></a></li>
<li class="thumb-small thumb6"><a href="pictures/6.jpg" rel="lightbox[group]"></a></li>
</ul>
</div>
<div class="footer">Content</div>

Thank you for any help :)

Geoffrey james

8:26 pm on Sep 2, 2007 (gmt 0)

10+ Year Member



Hi GeoffAllen

Try this in your styles

position:relative;

This markup forces content to fall below other content no matter how large the above content gets.

geoffb

geoffalan

8:30 pm on Sep 2, 2007 (gmt 0)

10+ Year Member



Totally worked, thank you very much!

Geoffrey james

11:03 am on Sep 3, 2007 (gmt 0)

10+ Year Member



Hi geoffallen,

you are very welcome, can I just say that you were right to use this site for your questions, there are some REAL experts on here, and I mean EXPERTS!

I am no such expert, infact nowhere near, but I am glad I was able to help you out.

Cheers Geoff

sifredi

10:36 pm on Sep 3, 2007 (gmt 0)

10+ Year Member



Sounds like you need to clear the floats before the footer. To make it simple, just add
overflow: auto;
to the element that contains the floated elements (in this case the ul or div). If you get a scrollbar-problem, do a search for "clearfix" for another way of simple clearing.

Hope that helps.

geoffalan

8:03 pm on Sep 8, 2007 (gmt 0)

10+ Year Member



Thanks, sifredi. I didn't think to use overflow: auto;