Having trouble aligning two divs.

Discussion in 'CSS' started by MaxMoskol, Apr 8, 2009.

  1. #1
    http://www.buyjeepparts.net

    The search box and the text that says "BuyJeepParts.net is your premier source for information, articles, reviews, and more on Jeep related parts and accessories. " should be right next to each other, with the search box on the left and the text on the right. For some reason I can't get them to align.

    Any help?
     
    MaxMoskol, Apr 8, 2009 IP
  2. FreeCashTube

    FreeCashTube Peon

    Messages:
    378
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I was not able to get your style sheet to see how you have set it up, but you can easily avoid that by creating a table.

    build two columns, and pop each side in to the table. Use % to ensure consistency in other browsers

    hope this help
     
    FreeCashTube, Apr 8, 2009 IP
  3. Oxi

    Oxi Peon

    Messages:
    78
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try using absolute positioning.
     
    Oxi, Apr 8, 2009 IP
  4. My220x

    My220x Member

    Messages:
    624
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    35
    #4
    Ok I removed the float from the welcome div, gave it a width of 500px and set it to position: relative and then top: 30px;
     
    My220x, Apr 9, 2009 IP
  5. MaxMoskol

    MaxMoskol Peon

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    This helped somewhat. It looks fine in Firefix except the Search and welcome text were suppose to be on the opposite sides of each other.

    In IE though, it's just messed up. I'll keep playing with it buy if anybody else could help, that'd be great.
     
    MaxMoskol, Apr 9, 2009 IP
  6. sudharsan

    sudharsan Active Member

    Messages:
    164
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #6
    try using padding.
     
    sudharsan, Apr 9, 2009 IP
  7. bingobob

    bingobob Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I would not be designing the site the way you are right now but here is a fix:

    styles.css (line 74)

    #middle2 {
    margin:0;
    }

    styles.css (line 110)

    #welcome {
    background:#8D8D8D none repeat scroll 0 0;
    font-family:Arial;
    font-size:12px;
    height:116px;
    left:237px;
    margin-left:4px;
    padding:23px 20px 0 10px;
    position:absolute;
    top:371px;
    width:500px;
    }
     
    bingobob, Apr 12, 2009 IP
  8. MaxMoskol

    MaxMoskol Peon

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Thank you very much.
     
    MaxMoskol, Apr 21, 2009 IP