div position problem

Discussion in 'CSS' started by cri8bat, Dec 27, 2008.

  1. #1
    Hi all
    I am working on the website vegetablesgrowing dot com
    I have put a div for the content as an id of main_content
    and after that I have a class div menu which is the navigation.

    I want that the navigation div will allways stay on the top no matter what content I add on the main_content div.

    I know I can fix if I just put the div main_contet after the div menu.

    I but I want the div_content first because of SEO purpused such as h1 and the first paragraph :)

    PS: I tried float:left but didnt work, I also tried posion:absolut; top:0
    and didnt work either....


    can some1 pls. help on this isse, I kwow the site is still undervelopment but better to fix things earlier as possible :)

    thanks in advance
     
    cri8bat, Dec 27, 2008 IP
  2. cheapez

    cheapez Active Member

    Messages:
    1,123
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    78
    #2
    #div wrapper {
    width: 960px;
    }

    #div menu {
    float: right;
    width: 960px;
    clear: both;
    }

    #div content {
    float: left;
    width 960px;
    }

    ----------------
    <div id="wrapper">
    <div id="content"></div>
    <div id="menu"></div>
    </div>

    Does this works?
     
    cheapez, Dec 27, 2008 IP
  3. cri8bat

    cri8bat Well-Known Member

    Messages:
    1,459
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    160
    #3
    hi tkx :)

    sorry for the late reply.... because of Christmass and new year didnt had time to work on this project...

    but anyways
    I tried what you said, and it worked :)
    the menu goes to the top and stays there but the background (the bg div) dosent remain white it becames green..... (on firefox)

    do you know how to fix that as well :)

    here is the link with the changes
    http://www.vegetablesgrowing.com/2.html
     
    cri8bat, Jan 4, 2009 IP