Jump to content

Simple Image layout looks great in IE but messed up in FF


The_Todd

Recommended Posts

<!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">

<head>
  <title>Hello!</title>

<style type="text/css">
<!--
#thumb_table_wrapper {
border:1px solid black;
height:auto;
padding:5px;
width:60%;
text-align:center;
}
#image {
border:1px dashed Gray;
float:left;
margin:4px;
padding-top:6px;
position:relative;
height:150px;
width:150px;
}


-->
</style>

</head>

<body>

<div id="thumb_table_wrapper">

    <div id="image">
    <img src="../user_files/1/thumb_1.jpg" />
    <br />
    Image
    </div>
    <div id="image">
    <img src="../user_files/1/thumb_2.jpg" />
    <br />
    Image
    </div>
    <div id="image">
    <img src="../user_files/1/thumb_3.jpg" />
    <br />
    Image
    </div>
    <div id="image">
    <img src="../user_files/1/thumb_4.jpg" />
    <br />
    Image
    </div>
    <div id="image">
    <img src="../user_files/1/thumb_1.jpg" />
    <br />
    Image
    </div>
    <div id="image">
    <img src="../user_files/1/thumb_2.jpg" />
    <br />
    Image
    </div>
    <div id="image">
    <img src="../user_files/1/thumb_3.jpg" />
    <br />
    Image
    </div>
    <div id="image">
    <img src="../user_files/1/thumb_4.jpg" />
    <br />
    Image
    </div>


</div>

</body>

</html>

This is the reverse of my usual problem, but this looks exacly like I want in IE 6, but the wrapper outline if Firefox doesn't wrap around all the div's, it only shows the wrapper about 10px tall but everything else works as intended. This has been killing me for HOURS! Thanks for your help! -Todd

Link to comment
Share on other sites

You could try placing

 

<div style="clear:left;"></div>

 

after all your image divs are finished, but within your container div.  Firefox does not expand containers to contain floats unless you include an empty div that clears the floats...if I remember correctly.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.