Common Div Issue, but need an explanation and best solution

Discussion in 'CSS' started by vermontguy, Jul 8, 2010.

  1. #1
    I've have run into this many times, but I have found a good explanation of why. I usually do a crazy work around so I'm wondering what the best solution is to the issue.

    Basically what happens is that I'll create a div and it will slide down and not match up with where the other div left off. If I give it a position of absolute it brings it up to where it's supposed to be but then the container doesn't expand with the content.

    Example can be found here: http://cuban.phiddledesign.com

    Basically I want the text content to sit to the right of the rotating images on the left.

    Thanks,
    Matt
     
    vermontguy, Jul 8, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    I don't see any rotating images.
    However, you can position the left & right div as relative and float to left. Like this

    .div_left{
    width:200px;
    height:200px;
    position:relative;
    float:left;
    }
    .div_right{
    width:600px;
    height:200px;
    position:relative;
    float:left;
    }
     
    radiant_luv, Jul 9, 2010 IP