how to show 2 separate DIV's in single row/line in html?

Discussion in 'HTML' started by hemant.singh@gmail.com, Apr 23, 2006.

  1. Guest

    Hello,
    I need two separate DIV's(As i update there data separately) one
    following another in same line
    so I am try'g something like
    <div id=123A>ABC</div>
    <div id=123B>DEF</div>
    But this put a \n between when it display, so I modified and tried
    following
    <div id=123A style="float: left; text-align: left;">ABC</div>
    <div id=123B style="float: right; text-align: right;">DEF</div>

    Now they are on same line, but on extreme left and right, While I want
    2nd DIV to be jst followed by first div, so tht output is like
    ABCDEF

    Any suggestions?
    , Apr 23, 2006
    #1
    1. Advertising

  2. wrote:
    > Hello,
    > I need two separate DIV's(As i update there data separately) one
    > following another in same line
    > so I am try'g something like
    > <div id=123A>ABC</div>
    > <div id=123B>DEF</div>
    > But this put a \n between when it display, so I modified and tried
    > following
    > <div id=123A style="float: left; text-align: left;">ABC</div>
    > <div id=123B style="float: right; text-align: right;">DEF</div>
    >
    > Now they are on same line, but on extreme left and right, While I want
    > 2nd DIV to be jst followed by first div, so tht output is like
    > ABCDEF

    Use for both divs "float: left".
    --
    Edwin van der Vaart
    http://www.semi-conductor.nl/ Links to Semiconductors sites
    http://www.evandervaart.nl/ Persoonlijke website
    Explicitly no permission given to Forum4Designers, onlinemarketingtoday,
    24help.info and issociate.de to duplicate this post.
    Edwin van der Vaart, Apr 23, 2006
    #2
    1. Advertising

  3. ironcorona Guest

    Edwin van der Vaart wrote:

    > Use for both divs "float: left".


    Damnit but that's just genius. I never thought of that. The
    alternative I was going to mention is use
    {display:table-cell;}

    The one drawback is that IE doesn't recognise this.

    One day IE7 will ship and they'd really want to have full CSS support so
    we can put this unpleasantness behind us.


    --
    ironcorona
    ironcorona, Apr 23, 2006
    #3
  4. Guest

    Edwin,
    Thats genius ... I wonder, dam me, I posted question without even try'g
    somethings like this...


    Edwin van der Vaart wrote:
    > wrote:
    > > Hello,
    > > I need two separate DIV's(As i update there data separately) one
    > > following another in same line
    > > so I am try'g something like
    > > <div id=123A>ABC</div>
    > > <div id=123B>DEF</div>
    > > But this put a \n between when it display, so I modified and tried
    > > following
    > > <div id=123A style="float: left; text-align: left;">ABC</div>
    > > <div id=123B style="float: right; text-align: right;">DEF</div>
    > >
    > > Now they are on same line, but on extreme left and right, While I want
    > > 2nd DIV to be jst followed by first div, so tht output is like
    > > ABCDEF

    > Use for both divs "float: left".
    > --
    > Edwin van der Vaart
    > http://www.semi-conductor.nl/ Links to Semiconductors sites
    > http://www.evandervaart.nl/ Persoonlijke website
    > Explicitly no permission given to Forum4Designers, onlinemarketingtoday,
    > 24help.info and issociate.de to duplicate this post.
    , Apr 24, 2006
    #4
  5. pascalc

    Joined:
    Aug 17, 2009
    Messages:
    1
    thanks for the tip

    FYI, it does work with IE6 and IE7 :)
    pascalc, Aug 17, 2009
    #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. Randall Parker
    Replies:
    1
    Views:
    604
    S. Justin Gengo
    Dec 12, 2005
  2. EvgueniB
    Replies:
    1
    Views:
    624
    Anthony Borla
    Dec 15, 2003
  3. Frank Fredstone
    Replies:
    1
    Views:
    437
    Jean-Francois Briere
    Jun 27, 2006
  4. D
    Replies:
    0
    Views:
    207
  5. ela
    Replies:
    12
    Views:
    347
    Uri Guttman
    Apr 6, 2009
Loading...

Share This Page