PDA

View Full Version : DIV Not Stretching...


robocop
02-15-2006, 11:26 PM
hello to all of you...

it seems im in a bit of a predicament...not sure exactly how to proceed...

due to our company's setup...i need to make a div layer visible that COULD Have <TABLE>'s and other old-school stuff in it, which could vary in width.

problem is, in Firefox, the div doesnt 'stretch' to accomidate the width of whats inside of it...

heres my "do a rough hack of it first example"


<style>
#pop{ border:1px solid black;width:200px;}
</style>
<div id="pop">
<table width="400"><tr><td>LONNNNNNNNNNNNNNNNNNNGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG TTTTTTTTTTTTTTTTTTTEEEEEEEEEEEEEEEEEEEEXXT</td></tr></table>
</div>


does anyone have any idea why Firefox wont stretch this div?

thanks a million in advance..

Bio2hazard
02-15-2006, 11:33 PM
Because width sets a fixed width;

You have 2 options I believe.

1. Using min-width for firefox and make a filter for IE with a normal width ( since width behaves in IE the same way min-width should )

2. Using overflow (http://www.w3schools.com/css/pr_pos_overflow.asp)

- Felix :)