The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

mixing floats in css and html

Is there a way to put text with an html floated image into a div defined in css?

I am constructing a page on the fly and trying to incorporate html that my client builds in simple html and stuff it into a div on my page. The code and css follow. Neither MSIE nor netscape seems to handle the result very well. Because the site is meant to be dynamic, I won't know what images might be included, nor their size. See sample at http://www.j4j.org/web/artcontest/2005/test2.php
MSIE6 hides the image behind the div and both browsers set the size of the div to that of the text, not the larger height of the image.

Is there a way to put text with an html floated image
into a div defined in css?

Because the site is meant to be dynamic, I won't know what images might be included, nor their size.

CSS can't be used to put various image sizes into an HTML page. Well, I guess technically you could but you're going to get funky results. You need to design your CSS around how big your images will be. The only problem I see with the code below (b/c I'm intermediate with CSS) is you have not declared a float value below, like so:

Mixing floats in css/html

That change did make a difference, at least the image doesn't get covered up. I guess I will probably forget about using the html approach and just define a couple of extra styles for handling the images.