Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Re: Floats: What am I doing wrong? (http://www.velocityreviews.com/forums/t730564-re-floats-what-am-i-doing-wrong.html)

MG 08-10-2010 06:31 PM

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



Jukka K. Korpela 08-10-2010 07:30 PM

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.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57