I need help with DIVS!

Discussion in 'CSS' started by redhits, Dec 31, 2008.

  1. #1
    hello guys, i need some helps!
    i want to create menus...

    menu have left, center and right... but i can't align the div...


    here i put the files...

    http://softgroups.com/temp/q/
     
    redhits, Dec 31, 2008 IP
  2. ExtremeData

    ExtremeData Well-Known Member

    Messages:
    450
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    125
    #2
    ExtremeData, Dec 31, 2008 IP
  3. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #3
    Especiallly while you are learning it always good to remark your divs to make it easy to follow and for other to help you easier.

    Example: <div class=msgmenu1> <!-- open msgmenu1 --> </div> <!-- close msgmenu1 -->

    The remarks are non displaying. I think you got the correct answer above.
     
    Colbyt, Dec 31, 2008 IP
  4. redhits

    redhits Notable Member

    Messages:
    3,023
    Likes Received:
    277
    Best Answers:
    0
    Trophy Points:
    255
    #4
    I removed it... because it's just a question , and wanted to code to not look big :) because i need responses....
    display:inline won't work ...

    float:left for all divs can work ...

    then have those 3divs in a big div...
     
    redhits, Dec 31, 2008 IP
  5. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5
    make sure you close all your DIV tags and after that you do display:inline.
     
    fairuz.ismail, Jan 1, 2009 IP
  6. fairuz.ismail

    fairuz.ismail Peon

    Messages:
    232
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #6
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <title>COMPOSE</title>
    
    <style type="text/css">
    .msgmenu1, .msgmenu2, .msgmenu3{
    	float: left;
    	}
    .msgmenu1 {
          width:13px;
          height:28px; 
          
          background-image:url('images/msgmenu1.gif');
           }       
    .msgmenu2 {
          height:28px; 
          width:250px; 
          background-image:url('images/msgmenu2.gif');
           }       
    .msgmenu3 {
          width:17px;
          height:28px; 
          
          background-image:url('images/msgmenu3.gif');
           }
    .clear {
    	clear:both;
    }
    </style>
    </head>
    
    <body>
    <div class="compose">
    	<div class="msgmenu">
    		<div class="msgmenu1"></div>
    		<div class="msgmenu2">COMPOSE</div>
    		<div class="msgmenu3"></div>
    		<div class="clear"/>
    	</div>
    </div>
    </body>
    
    </html>
    
    HTML:
     
    fairuz.ismail, Jan 1, 2009 IP