#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    1
    Rep Power
    0

    Footer div loaction


    i have div for footer which contain images of (facebook,twitter,youtube) in the middle but when i make zoom in or out the images go right or left ,, i want to keep them in the same position how to do that?
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    298
    Rep Power
    8
    This sounds like a floating issue. Put the images within another div and center that div.

    Try this:
    Code:
    <!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>
       <title>HTML Template</title>
       
    <style type="text/css">
    #footer
    {
    	width: 90%;
    	background: red;
    	margin: auto;
    	height: 150px;
    }
    
    #icons
    {
    	width: 200px;
    	margin: auto;
    	text-align: center;
    	background: blue;
    }
    
    img
    {
    	width: 30px;
    	height: 30px;
    }
    
    </style>
    </head>
    
    <body>
    
    <div id="footer">
    	<div id="icons">
    		<img src="img1.jpg" alt="facebook" />
    		<img src="img2.jpg" alt="youtube" />
    		<img src="img3.jpg" alt="twitter" />
    	</div>
    </div>
    
    </body>
    </html>
    Put this in a text file and run it.

    Check out the attachment.

    Delete the floats and add text-align: center; to your icon div.

    Kind regards,


    Nm.
    Attached Images

IMN logo majestic logo threadwatch logo seochat tools logo