layout

Discussion in 'HTML' started by King of Red Lions, Dec 14, 2004.

  1. Hi, is there anyway of putting two divs side by side without using the
    float attribute? Many thanks.
     
    King of Red Lions, Dec 14, 2004
    #1
    1. Advertising

  2. King of Red Lions

    Neal Guest

    King of Red Lions:

    > Hi, is there anyway of putting two divs side by side without using the
    > float attribute?


    The position property works too. But you cannot reliably put another div
    below two absolutely positioned side-by-side divs. Otherwise it's in some
    ways better than a float.
     
    Neal, Dec 14, 2004
    #2
    1. Advertising

  3. King of Red Lions

    rf Guest

    King of Red Lions

    > Hi, is there anyway of putting two divs side by side without using the
    > float attribute? Many thanks.


    Begs the question: Why?

    --
    Cheers
    Richard.
     
    rf, Dec 14, 2004
    #3
  4. King of Red Lions

    Steve Pugh Guest

    On Tue, 14 Dec 2004 11:22:57 +0000, King of Red Lions
    <thaynes/no_spam/@gawab.com> wrote:

    >Hi, is there anyway of putting two divs side by side without using the
    >float attribute?


    Use the position property.
    Use display: table-cell (and/or other table display options).
    Use display: inline-block (or inline-table).
    Nest them inside an HTML table.
    Use frames.

    Each has pros and cons. Some of the cons can be quite major.

    It often happens that float isn't the best choice but is often the
    "least worst" choice.

    Steve
     
    Steve Pugh, Dec 14, 2004
    #4
  5. King of Red Lions

    Spartanicus Guest

    King of Red Lions <thaynes/no_spam/@gawab.com> wrote:

    >is there anyway of putting two divs side by side without using the
    >float attribute?


    float is a css *property* (not attribute)

    display:table-cell
    display:inline-table
    display:inline-block

    Browser support varies.

    Provide us with information on what you are actually trying to do for
    more meaningful help.

    --
    Spartanicus
     
    Spartanicus, Dec 14, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rick Spiewak
    Replies:
    3
    Views:
    3,165
    Rick Spiewak
    Aug 26, 2003
  2. RobertH
    Replies:
    1
    Views:
    731
    Steve C. Orr [MVP, MCSD]
    Nov 4, 2003
  3. NWx
    Replies:
    4
    Views:
    2,964
    Kevin Spencer
    Feb 19, 2004
  4. Eric
    Replies:
    4
    Views:
    736
    clintonG
    Dec 24, 2004
  5. Replies:
    1
    Views:
    590
    John Timney \(MVP\)
    Jun 19, 2006
Loading...

Share This Page