Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Div height in firefox 1

Status
Not open for further replies.

styleBunny

Technical User
Jun 20, 2002
133
AU
Hi folks,

Im sure this is the same old problem that comes up time and time again, but i cant find a clear answer. How do i make my containing divs scale in height to match that of their content?

In this example, , the div contains the text and the images, (the images were in their own div as well), i have managed to get the height to scale to the length of the image div by using float:left, which is a win for me! But as of yet, the height of the overall containing div wont come to the party and scale its height to the length of the text div.

This occurs when viewing firefox. One slight casualty in ie, when using the float left to make the text div scale. Is that it has skewed the 5px left margin, making the div look aligned to the right. This is not so in ie.

Im sure there is a simple fix to this tho i can work it out!

thanks again
Paul.
 
try looking here


IE and Firefox/ mozilla type browsers use different margins.

----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
 
Hi,

Thanks for that link, its put me back on track!

Paul.
 
Hi Chris,

I think your right, someone pointed that out to me, so now im all like "float this, clear that" etc...

Thanks for the article i'll take a peek.
Paul.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top