Div problem

Discussion in 'HTML & Website Design' started by adscience, Nov 4, 2007.

  1. #1
    hello guys,

    I've got in small prob, plz help me

    how to make two DIVs seem in same line?
    like in this pic

    [​IMG]
     
    adscience, Nov 4, 2007 IP
  2. Shadab

    Shadab Peon

    Messages:
    376
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this out :

    <div style="float:right; ">
         Next >>
    </div>
    
    <div>
         << Previous
    </div>
    HTML:
    Thanx,
    Shadab.
     
    Shadab, Nov 4, 2007 IP
  3. adscience

    adscience Peon

    Messages:
    128
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    it works when directly used it as is but when implemented in css file, it is not working :(

    update: ok it worked after i did apply float in both DIVs float:right; and float:left;

    thanks for that
     
    adscience, Nov 4, 2007 IP
  4. Shadab

    Shadab Peon

    Messages:
    376
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It should work, even when the style is applied at external / document level.
    <style>
    .right {
         float:right;
    }
    </style>
    
    <div class="right">
         Next >>
    </div>
    
    <div>
         << Previous
    </div>
    HTML:
    Make sure the div that should appear on the right is placed "before" the div that is to appear on the left. (If you are using the float style attribute only for the div to be positioned on right)

    Yup... thats another solution to this problem.

    Thanx,
    Shadab.
     
    Shadab, Nov 4, 2007 IP