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

    Join Date
    May 2003
    Location
    Minnesota
    Posts
    19
    Rep Power
    0

    css issues with layout, thinking its the <body> tags


    in my css. I just took out the marginwidth and marginheight tags and put it in my stylesheet, and it seems to mess up everything. Instead of....

    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    in my tag at http://www.nasi.com/test.htm

    , I now have

    <body id="body">
    in my html and

    #body{
    margin: 0;
    }
    #html body {
    margin:0;padding:0;

    }
    in my linked css stylesheet. This is to validate better via xhtml. The only thing is, it seems to mess everything else up. For one, my navbar (systems, storage, networking) isn't centering in the navcontainer anymore, despite the

    ul#navlist
    {
    white-space: nowrap;
    list-style: inline;
    padding: 0;
    margin: 0 auto;
    width: 100%;
    font-size: 0.7em;
    text-align: center;
    }
    in the css, which seemed to work just fine before. Also, the logobar (the four logos at the top) doesn't have the four left borders with uniform height anymore as well. Is there something wrong with my syntax, or is there something seriously wrong with my css, or should I got back to the old bodytag with the marginwidth right in the code? Please help me, I'm going nuts here.
  2. #2
  3. what's your moniker?
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Highland Park, NJ
    Posts
    201
    Rep Power
    12
    Hi trigger,

    Couple things I found:

    first with the logo bar @ the top. Fixed the border height by giving the elements a height:

    Code:
    UL#logolist {PADDING-RIGHT:0px;
    	PADDING-LEFT:0px;
    	FONT-SIZE:0.7em;
    	PADDING-BOTTOM:0px;
    	MARGIN:0px auto; 
    	WIDTH:auto; 
    	BOTTOM:0px; 
    	PADDING-TOP:0px; 
    	HEIGHT: 100%; 
    	TEXT-ALIGN: center;
    	border:1 solid black;
    
    }
    
    UL#logolist LI {DISPLAY:block;
    	PADDING-LEFT: 0.5em;
    	FLOAT: right;
    	MARGIN: 0.25em;
    	BORDER-left:2px dashed;
    	WIDTH:15%;
    	BOTTOM:0px;
    	POSITION:relative;
    	HEIGHT:100%;
    	height:75px;}
    	
    
    UL#logolist LI A {
    	PADDING-RIGHT:0.25em;
    	DISPLAY:block;
    	PADDING-LEFT:0.5em;
    	PADDING-BOTTOM:0.05em;
    	VERTICAL-ALIGN:bottom;
    	COLOR: #0d2b88;
    	BOTTOM:0px;
    	PADDING-TOP:0.5em;
    	HEIGHT:100%;
    }
    but for some reason I had to make the height of the LI containing the select menu 82px instead of 75. don't know why, but you could always throw them in a table.

    as for the menubar in the center, it wasn't lining up b/c you had it set to float:left

    so I took that all out,

    Code:
    #navcontainer {
    	PADDING:0px;
    	PADDING-TOP:1em;
    	FONT-WEIGHT:bold;
    	BACKGROUND:#F00;
    	MARGIN:0px;
    	TEXT-TRANSFORM:uppercase;
    	FONT-FAMILY:Arial, Helvetica, sans-serif;
    	text-align:center;
    	padding-bottom:1em;
    }
    
    UL#navlist {
    	PADDING:0px;
    	FONT-SIZE: 0.7em;
    	MARGIN: 0px;
    	WHITE-SPACE: nowrap;
    }
    UL#navlist LI {
    	display: inline;
    }
    by setting the LI to inline instead of the UL, and taking out the width element, I got the list to line up the same way but cleaner. and by taking out the float, and putting in text-align:center in it's parent, that puts lines it up.

    I changed the colors on the divs just so I could figure out what was going on... honestly, I think the css is needlessly complicated, but if you don't have trouble following it, it's not "bad"

    www.nerdster.com/greg/temp

    not sure if I missed anything

IMN logo majestic logo threadwatch logo seochat tools logo