#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Posts
    6
    Rep Power
    0

    css layout problem


    Code:
    body {
    	margin: 0px 0px 0px 0px;
    	padding: 0px 0px 0px 0px;
    	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
    	font-size : 11px;
    	color: #FFFFFF;
    	background-color: #660000;
    	text-align: center;
    }
    #nav {
    	padding: 2px;
    	margin-top: 0px;
    	margin-bottom: 20px;
    	margin-right: auto;
    	margin-left: auto; 
    background: #660000;
    	border: 5px solid #FFFFFF;
    	width: 500px; 
    	voice-family: "\"}\"";
    	voice-family:inherit;
    	width: 470px;
    	}
    html>body #nav {
    	width: 470px; 	}
    	
    #banner {
    	padding: 2px;
    	margin-top: 20px;
    	margin-bottom: 20px;
    	margin-right: auto;
    	margin-left: auto; 
    background: #660000;
    	border: 5px solid #FFFFFF;
    	text-align:left; 
    	width: 500px; 
    	voice-family: "\"}\"";
    	voice-family:inherit;
    	width: 470px;
    	}
    html>body #banner{
    	width: 470px;
    	}
    	
    #content {
    	padding: 2px;
    	margin-top: 0px;
    	margin-bottom: 20px;
    	margin-right: auto;
    	margin-left: auto; 
    	background: #660000;
    	border: 5px solid #FFFFFF;
    	text-align:left;
    	width: 500px; 
    voice-family: "\"}\"";
    	voice-family:inherit;
    	width: 470px;
    	}
    html>body #content {
    	width: 470px;	}
    the code above is my css for a page i'm creating

    the html is very simple
    and is one div after another (3 in total)
    it places them one after the other but with a gap of approx 30px between them
    i want the to rest on top of each other... any suggestions of how to sort this?
  2. #2
  3. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    just change all margin-top and margin-bottom to 0px
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2002
    Posts
    6
    Rep Power
    0
    thanks you....

    i have been sat looking at various bits of code for a good few hours now and after all it just blurs into one!!!

    i can't believe i missed that!!

    thanks again
  6. #4
  7. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    no problem,

    know how it can be

    done the same lots of times,

IMN logo majestic logo threadwatch logo seochat tools logo