![]() |
Re: Floats: What am I doing wrong?
"Padmar Mushkin" <x@y.z> wrote in message news:9u1366devn6k7g46lhhrpst6fqnlh47cr9@4ax.com... >I have a div containing a background image, a div containing text, and > want them to appear side by side. I tried floating them, but the text > is appearing below the image. I uploaded an example here: > > http://meechme.com/test.html > Is this what you are looking for? http://www.blighty.co.za/floattest/floattest.html MG |
Re: Floats: What am I doing wrong?
Padmar Mushkin wrote:
> Maybe a table is the only non-JS way to do what I want? At least it appears to be the simplest and most reliable way. > There could > potentially be hundreds of these on a page. Would using that many > tables be a performance problem? Hardly if you use two-cell tables. If you use a single table with multiple rows, then there would be the problem that a browser might not render anything before it has received and formatted the entire table, as the last cell may contain something that affects the layout. But this is easy to deal with in a case like this: you would just set table { table-layout: fixed } in CSS, which means that the browser calculates the column width according to the _first_ row, so it can start rendering content as soon as it has processed that row. > Ironically not so long ago I would use *only* tables for layout, and > it didn't even occur to me to use a table until now. There are still occasions where a simple layout table works best. The problems of tables for layout typically originate from (overly) complex (often nested) tables and fine-tuned pixel-exact layout that often prevents content from taking its natural shape. -- Yucca, http://www.cs.tut.fi/~jkorpela/ |
| All times are GMT. The time now is 04:21 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.