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

    Join Date
    Dec 2003
    Posts
    124
    Rep Power
    11

    Setting div padding-left


    Hi I am using divs side by side but the left div seems to think that the padding-left is not relitive to the div it is in but to the div to the left. The left div is named margin and the right hand div is named PageContent

    Code:
    #margin
    {
    	float:left;
    	height:800px;
    	width:10px;
    	background-color:green;
    }
    
    #PageContent
    {
    	padding-left:12px;
    }
    
    URL: http://www.des-otoole.co.uk/SM3S/temp.php
    
    
    Desmond.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    9
    Hi Otuatail,

    You need to declare float: left on your #PageContent div also.
    Code:
    #PageContent
    {/*
    	padding-left:12px;*/
    	float: left;
    }
    Hope this helps you.

    Kind regards,

    NM.

IMN logo majestic logo threadwatch logo seochat tools logo