Alright so the java script works no problem, pretty simple and light weight but I cannot figure out for the life of me why my page wrap is not expanding with the gallery. It does for text (look at any of the other pages)
You need to put a clear in like <br style="clear:both" />
When you have two or more floated divs nested within a wrapper the wrapper will lose it's dimensions putting a clear after the last float but before the wrapper closes will fix it.
Whenever you float elements within a containing element, the containing element WILL COLLAPSE unless you do one of the following:
1) Float the containing element as well. However, this will not ensure that the containing element interacts properly with other elements on the page. 2) You clear the floated elements. This can be done by adding an empty element such as a div or li tag after the other elements with "clear:left" applied using CSS. This clearing element must be INSIDE of the containing element. Otherwise, the containing element will collapse.
If you haven't watched Chris' screencast #42: All About Floats, please do so! It is a great episode covering floats and how to work with them.
Another thought about your page: you are currently floating the img tags. Keep in mind that floating is easier when you apply it to the TOPMOST element that needs to float. In this case, it would be better to apply it to the li elements that contain the image tags, not the actual img tags themselves.
Alright so the java script works no problem, pretty simple and light weight but I cannot figure out for the life of me why my page wrap is not expanding with the gallery. It does for text (look at any of the other pages)
here is the html
and here is the CSS
When you have two or more floated divs nested within a wrapper the wrapper will lose it's dimensions putting a clear after the last float but before the wrapper closes will fix it.
1) Float the containing element as well. However, this will not ensure that the containing element interacts properly with other elements on the page.
2) You clear the floated elements. This can be done by adding an empty element such as a div or li tag after the other elements with "clear:left" applied using CSS. This clearing element must be INSIDE of the containing element. Otherwise, the containing element will collapse.
If you haven't watched Chris' screencast #42: All About Floats, please do so! It is a great episode covering floats and how to work with them.
Another thought about your page: you are currently floating the img tags. Keep in mind that floating is easier when you apply it to the TOPMOST element that needs to float. In this case, it would be better to apply it to the li elements that contain the image tags, not the actual img tags themselves.
Anyway, hope that helps!