Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Floats: What am I doing wrong?

Reply
Thread Tools

Re: Floats: What am I doing wrong?

 
 
MG
Guest
Posts: n/a
 
      08-10-2010

"Padmar Mushkin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>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


 
Reply With Quote
 
 
 
 
Jukka K. Korpela
Guest
Posts: n/a
 
      08-10-2010
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/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
recommendation doing co-simulation between c/c++ with vhdl Carson VHDL 0 10-05-2005 07:40 PM
What is VS Doing to my Code??? downs.matt@gmail.com ASP .Net 1 09-02-2005 11:38 AM
Why is Mozilla doing this ... and how to fix it Joe S. Firefox 7 06-07-2005 04:12 AM
VB6/VB.Net Programming Question - what am i doing wrong? Salisha Khan ASP .Net 1 08-01-2003 01:55 PM
What am I doing wrong? Keith R. Williams VHDL 4 07-15-2003 03:08 AM



Advertisments