Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

My CSS floats are affecting other DIVs

Discussion in 'Programming' started by Wolfie, Nov 16, 2010.

  1. Wolfie

    Wolfie New Member Webmaster

    Hi, have run a search on this but nothing came up so heres my question.

    I have a website written in html and I'm working on version 2 which will be done with CSS. Now what I have so far is 5 levels of divs which gives me a middle space with a 200px column on both sides. Each side column is a different block/div.

    Now I want to have some photos running down both side columns, and there are also some photos in the text in the middle section too.

    So I go to the first section and put in photos. They have to be designated to 'float left' or else the rest of the divs move below them. OK so far so good. So then I put in the right hand photos in a different div and designate them 'float right'. However they are basing their positioning on the photos on the left side and starting below them!

    OK I managed to cure that by positioning them relatively. HOWEVER now the pictures in the text are positioning themselves below the ones in the right column and away from their places in the text!!!!!!. I can't cure that by relative positioning because when they move back up, they obscure the text.

    Now as I understand it, elements in separate DIVs are supposed to be exclusive so whats going on?

    I can provide code if necessary

  2. Manuel - Regdotter

    Manuel - Regdotter New Member Webmaster

    Probably worth looking up some 3 column web page how to's as it would be simpler than trying to explain it.
  3. misamisa

    misamisa New Member Webmaster

    try to play with positions like position:absolute,relative or static. but if your using float, I recommend position:absolute;with proper positioning,this will solve your problem.

Featured Resources (View All)

Share This Page