www.webdeveloper.com
Results 1 to 2 of 2

Thread: tow divs need to be float right

  1. #1
    Join Date
    Nov 2012
    Location
    Pakistan.
    Posts
    8

    tow divs need to be float right

    hi guys,
    I have a problem , please help me. I want two divs to be float on right side. please check the code.
    I have attached an image to be this more clear for you.
    Code:
    <html>
    	<head>
        	<title>
            	Get All Internet Services
            </title>
    <style type="text/css" >
    #container{/*container div*/
    	margin:auto;
    	border:solid black 1px;
    	height:1280px;
    	width:1024px;
    	}
    #header{/*container div, this div have phone div and menu div*/
    	float:right;
    	border:solid 1px;
    	height:10%;
    	width:100%
    	}
    	#headerimg{/*logo image div*/
    		height:100%;
    		width:17%;
    		background:#0F6;
    		border:1px solid;
    		float:left;
    		margin:0 0 0 0;
    		}
    #phonelinks{/*phone div in header div*/
    	float:right;
    	width:35%;
    	height:20%;
    	border:1px solid;
    	margin:0 0 0 0; 
    	}
    #menu{/*this is manu div */
    	height:25%;
    	border:solid 1px;
    	float:right;
    	margin:0 0 0 50%;
    	
    	}	
    #menu ul li{/* <ul> containing menu items*/
    	color:#000;
    	list-style:none;
    	display:inline;
    	}			
     </style>
        </head>
        <body>
        	<div id="container">
            	<div id="header">
                		<div id="headerimg">image
                        	<a href="#"><img src="#"/></a>
                        </div>
    					<div id="phonelinks">
                        	phone number<!--phone div-->
                        </div>
                    <div id="menu">
                		<ul><!--menu div-->
                    		<li>HOME</li>|
                            <li>PORTFOLIO</li>|
                            <li>ABOUT</li>|
                            <li>BLOG</li>|
                            <li>CONTACT</li>|
                            <li>FEATURES</li>
                    	</ul>
                  	</div>
                
                </div>
    		</div>
        </body>
    </html>

  2. #2
    Join Date
    Oct 2012
    Posts
    55
    I would suggest you get your floats right before you start adding % dimensions.

    Dan

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles