please help for css positioning problem

Discussion in 'CSS' started by shamal, Jun 25, 2008.

  1. #1
    hi all, i m facing a problem in css divs.. the divs are ovelapping on each other
    in firefox but looking great in IE 6 n 7
    there are three divs.. main , top n bottom. in html tags are like this:
    <div calss="main">
    <div class="top"></div>
    <div class="bottom"></div>
    </div>
    in css
    .main
    {
    width: 1000px;
    height: 700px;
    }
    .top
    {
    height: 300px;
    }
    .bottom
    {
    height: 300px;
    }

    dun want to use fixed positions.. is there any other solution. help me plz if some1 knows
     
    shamal, Jun 25, 2008 IP
  2. 007c

    007c Peon

    Messages:
    611
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Make top and bottom float left and specify their width to 100%
    Also note a div inside a div will be at the top unless you specify padding in the main div or add another div inside it.
     
    007c, Jun 25, 2008 IP
  3. Quevin

    Quevin Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    maybe just define width's w/o float.
     
    Quevin, Jun 25, 2008 IP
  4. shamal

    shamal Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    thx folks.. but it didnt work..gave float: left n width: 100%.. but still divs are overlapping in firefox.. while giving fixed positions then divs placement are different in bot IE n Firefox.. while they need to show in up n down positions..
     
    shamal, Jun 25, 2008 IP
  5. Quevin

    Quevin Peon

    Messages:
    46
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I tried this code exactly, and seems OK in FF2. Can I see the actual page?
     
    Quevin, Jun 25, 2008 IP