i am building a image gallery website which is on my localhost, i’m having issues on FF(3.6.11) and Safari(5.0.2) where my image gallery is somewhat overlapping my div footer meaning the footer div is right underneath my image gallery. The word footer, is outside the image gallery div which is fine but the actual div bar thing has not been moved down appropriately to deal with images, this also applies to Content div.
Thanks for the quick reply, here is the html source code taken from the FF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title> Shanghai Trip 2010</title>
<link rel="stylesheet" type="text/css" href="style_V1.css" />
<meta http-equiv="content-type"
content="text/html; charset=utf-8"/>
</head>
<body>
<div id="wrapper">
<div id="header">
<h1> SHANGHAI TRIP 2010 </h1>
</div>
<div id="navigation">
<ul>
<li><a href="index.php?link=home">Home</a></li>
<li><a href="index.php?link=shanghaizoo">Shangai Zoo</a></li>
<li><a href="index.php?link=chengtemple">Cheng Huang Temple</a></li>
</ul>
</div>
<div id="content">
<div class="pagedesc">
<p>
Hi, welcome to my site, here you will be able to see a wide variety of holiday pictures taken while
I was in Shanghai 2010 during the Summer holidays. You will also be able to see what it was like in
The Shanghai World Expo to places such as Shanghai Financial center.sssssssssssssssssssssssssdddddd
dddddddddddddddddddddddddddddddd
</p>
</div>
<div class="imageswrapper">
<div class="thumb"><img src="./images/IMG_0075.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>Temple Area Market</div></div><div class="thumb"><img src="./images/IMG_0109.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>side view</div></div><div class="thumb"><img src="./images/IMG_0111.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>Dragon Head</div></div><div class="thumb"><img src="./images/IMG_0302.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>Just hanging around!</div></div><div class="thumb"><img src="./images/IMG_0196.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>snake</div></div><div class="thumb"><img src="./images/IMG_0214.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>Monkey</div></div><div class="thumb"><img src="./images/IMG_0268.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>Pelecon</div></div><div class="thumb"><img src="./images/IMG_0090.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>Pond view</div></div><div class="thumb"><img src="./images/IMG_0147.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>temple test</div></div><div class="thumb"><img src="./images/IMG_0155.JPG" width="150" height="100" ><div class="thumbdesc"><b>Description:</b>temple test 02</div></div>
</div>
</div>
</div><!-- End Wrapper -->
<div id="footer">
FOOTER
</div>
</body>
</html>
And i’ll take a look at what u recommended to see if it helps
thanks for the reply, i really don’t mean to be a bother here but after adding that code snippet, i noticed that on FF and Safari from the heading, it seemed to drop revealing my red background as shown in the given link:
Hi, i managed to solve it, under my header div i added the following: overflow:hidden, which seemed to work fine. I don’t know if that is the recommended/standard solution but it worked.
The red gap that appears at the top is the fact that the top margin on the h1 no longer collapses on to the wrapper and thus pushes the header element away from the top of the wrapper. Originally the margin would collapse and effectively become a top margin on the wrapper instead.
The overflow:hidden stopped the margin affecting the wrapper but then the header was moved down instead and not the h1. When you put overflow:hidden on the header then you again stopped the margin collapse and the h1 was moved down instead
If you had just removed the top margin for the h1 then there would have been no collapse. You could move it down with a bit of top padding if needed. The overflow:hidden will do the same job and is ok as long as you don’t need visible overflow.