Previous Message
Next Message

inline blocks

Sent by gislain wautriche on 27 April 2004 14:02


Zoe Gillenwater wrote:

> gislain wautriche wrote:
>
>> Hello everybody there !
>>
>> I'm fresh new to the "css way of life",  but I've been working html 
>> (with table) for quite long.
>> As I "think in tables", I can't find a correct way to do this using 
>> css :
>>
>> ------------------------    ------------------------
>> |block 1               |   |block2                  |
>> |                      |   |                        |
>> |                      |   |                        |
>> |                      |   |                        |
>> |                      |   |                        |
>> |                      |   |                        |
>> ------------------------    ------------------------
>> 300px                       300px
>>
>>
>> I want to have the blocks "inline", so using tables and cells, that 
>> would be :
>>
>> <table>
>>   <tr>
>>       <td width="300">block1</td>
>>       <td width="300">block2</td>
>>   </tr>
>> </table>
>>
>>
>> So Far, I'm using 2 <div> blocks, the second block has a 300px 
>> margin-left
>> but they won't "overlapp" :
>>
>> ------------------------ |block 1               |
>> |                      |
>> |                      |
>> |                      |
>> |                      |
>> |                      |
>> ------------------------
>>                          ------------------------
>>                          |block2                  |
>>                          |                        |
>>                          |                        |
>>                          |                        |
>>                          |                        |
>>                          |                        |
>>                           ------------------------
>>
>>
>>
>> I don't know if using "float : left " for the first block is correct.
>> So can anyone point me to a solution, or something ? 
>
>
>
> Hi,
>
> You can do this in a number of different ways.  If you are floating 
> your first box to the left, but the other box will not sit beside it, 
> that means there is not enough room for them to display side by side.  
> Without seeing your code, we can't tell why there isn't enough room.  
> If it is just happening in IE6, then it is probably due to the extra 
> three pixels that browser adds on to sides of floats.
>
> http://www.positioniseverything.net/floatmodel.html
> http://www.positioniseverything.net/explorer/threepxtest.html
>
> If it is happening in all browsers, then you probably have an 
> incorrect value somewhere.
>
> Zoe
>
Hi zoe,
thanks for help.

I don't have a specific code nor a problem... just searching around how 
this can be done corectly (using the best method ).
As said, I'm used to create tables in tables in tables... and I'm trying 
to switch to a cleverer css code.
So the float model appears interesting, but is this THE way to draw 
blocks "inline" ? that was the question.

thanks for the links, I now have more to read, tonight :)
Cheers,
Gis.



______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: