SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy somebody heeeeelp

    ok, im new for everything here and not so smart it seems. here is my little css text. i try to make a horizontal menubar but just cannot make it right. im sooooooooo frustrated here now. it make me want to kick something....
    it seems that the float element doesn't belong to the container it should be in(at lest don't completely belong to, yeah?). it seems they just 'foat' there and not 'in' it. oh can someone tell me how can i make them right? pleeeeaaase.

    so this is my css text:
    body{
    background: #666666;
    margin: 0px;
    padding: 0px;
    color: #FFFFFF;
    width: 100%;
    }

    #menu{
    margin: 20px;
    padding: 0px;
    border: 2px solid #FFFFFF;
    }

    #menubar{
    margin: 0;
    padding: 0;
    border: none;
    position: relative;
    }

    #menubar ul{
    clear: left;
    display: inline;
    border: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    text-align: center;
    list-style-type: none;
    }

    #menubar li{
    float: left;
    display: block;
    margin: 0;
    width: auto;
    border-left: 1px solid #FFFFFF;
    border-right: 1px solid #333333;
    }

    #menubar li a{
    padding: 10px 25px 10px 25px;
    color: #FFFFFF;
    display: block;
    text-decoration: none;
    width: 100%;
    }

    #menubar li a:hover{
    background: #CCCCCC;
    color: #FF0000;
    }

    #content{
    clear: both;
    border: 2px solid #FFFFFF;
    margin: 10px 20px;
    padding: 0;
    }

    /***************************************************/

    and this is html text:
    <body>
    <div id="menu">
    <div id="menubar">
    <ul>
    <li><a href="#">1111111</a></li>
    <li><a href="#">2222222</a></li>
    <li><a href="#">3333333</a></li>
    <li><a href="#">4444444</a></li>
    <li><a href="#">5555555</a></li>
    </ul>
    </div>
    </div>
    <div id="content">daohwdoahawo</div>
    </body>

  2. #2
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ho woooooooooooooooowwwww, how do you make it oh god! hehe, you are cooooool

  4. #4
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, i see. you declare a height for the container. so, the froat elements are not in that container, right? oh, i thought there is some way make them in it and then everything can fit in there place themselves. well, i know im a lazy bone here.....

    beside, how do you make the page in a 'here'?? can i do that myselfe? it is great.

  5. #5
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a better way.

    Here, there is less markup to do the same job and the li's are fully contained by the ul. Floated parents contain floated children...

    To insert a link into your message, click the link icon in the editor when you write your message.

  6. #6
    SitePoint Member
    Join Date
    Mar 2005
    Location
    Guangzhou Guangdong, China
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh thank you.
    im that 'EastenPig'. aaaaaaaaaaaaargh. i can't belive that i have type it wrong yesterday. what a dumbass i am!!! i have to pay an entire hour to make things right. i have change my password two times and at last i have figure out it is the username's fault.....hellllllllll. do anyone know how to drop the fudge id??? i don't need it anymore.

    i just want to ask you guys about somewhere can get the free space for my webs. so i can put my stuff in it and quote them to here.
    at last thank BonRouge again.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •