Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Spacing is weird, help!

    I'm making a custom theme for a wysiwyg web design application, and this is the first time I've tried to learn CSS. So far, I'm fairly pleased with the results. The problem I'm having, however, is that there's space between my background header image and my navbar header image, which are supposed to match up. I sort of fixed this by adding a 1px line between the two (though now the problem is that I have an unwanted line between them) and in IE it still looks terrible and separated. Also, the navigation links are too low and need to be moved up to fit in with the background image.
    You can see the work in progress at: http://www.kevindosi.com/untilreallife/. If anyone could help me, I'd greatly appreciate it. Here's a link to a zip file of the theme (css file, index web page, and images included) if you want to take a look to see what the problem might be: http://www.kevindosi.com/files/Theme.zip
    Again, I'd really appreciate if you could help. Thanks!

    -Kevin

  • #2
    Regular Coder
    Join Date
    Apr 2008
    Location
    Manila, Philippines
    Posts
    263
    Thanks
    3
    Thanked 12 Times in 12 Posts
    dude..

    here's my thoughts about this.. i think to solve this.. you should set your default margins and paddings off.. cause ie tends to give this excess craps..

    just add this code to your style sheet.. and your off the hook i think..

    Code:
    *{margin:0;
        padding:0;
      }
    and the adjust some css accordingly.. like the header and nav bg.. i think you need to fix those..

    hope this helps..

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    You have some markup errors - here.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,749
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello kevindosi,
    I commented out a bunch of stuff that wasn't working. I tried to highlight the changes in red, hopefully I got them all.
    I had to change your image paths to absolute just so I could edit things, just ignore that part.
    Code:
    /* @group General Styles */
    
    body {
    	font-family: "Arial Narrow", "Abadi MT Condensed Light", "Times New Roman";
    	background: url(http://www.kevindosi.com/untilreallife/rw_common/themes/sdktutorial/images/bg.gif) repeat;
    	color: #4a2e13;
    } 
    * {
    margin: 0;
    padding: 0;
    }
    	
    }
    
    p {
    }
    
    b, strong {
    
    }
    
    a:link, a:visited {
    	color: #81140e;
    	text-decoration: none;
    }
    a:hover, a:active {
    	color:  #000000;
    }
    
    img {
    	border: none;
    }
    
    .image-left {
    	float: left;
    }
    
    .image-right {
    	float: right;
    }
    	
    /* @end */
    
    /* @group Layout */
    
    #container {
    	width: 900px;
    	padding-left: 10px;
    background: #ccc; /*for testing*/
    overflow: auto; /*to clear floats*/
    	
    }
    
    .clearer {
    	clear: both;
    }
    
    #pageHeader {
    /*line-height: 0;*/
    /*height: 73px;*/
    	background: url(http://www.kevindosi.com/untilreallife/rw_common/themes/sdktutorial/images/headerbg.png) no-repeat;
    	text-align: center;
    overflow: auto;
    }
    
    #pageHeader img {
    }
    
    #pageHeader h1 {
    /*padding-top: 25px;*/
    	font-family: Cracked, Impact, Arial Narrow;
    	font-size: 2em;
    	color:  #81140e;
    	text-align: center;
    }
    
    #pageHeader h2 {
    	font-family: Cracked, Impact, Arial Narrow;
    	font-size: 1em;
    	text-align: center;
    }
    
    #contentContainer {
    	background: url(http://www.kevindosi.com/untilreallife/rw_common/themes/sdktutorial/images/bodybg.gif) repeat-y;
    	font-family: "Abadi MT Condensed Light";
    	font-size: .9em;
    /*top: 150px;
    position: absolute;*/
    	width: 810px;
    /*float: left;*/
    	}
    
    #contentContainer #content {
    	padding-left: 10px;
    	padding-right: 10px;
    	padding-top: 10px;
    	padding-bottom: 15px;
    		width: 796px;
    	
    }
    /* @group Toolbar */
    
    /* Toolbar Styles */
    
    #navcontainer {
    	width: 810px;
    	background: url(http://www.kevindosi.com/untilreallife/rw_common/themes/sdktutorial/images/navbarbg.png) no-repeat;
    	height: 46px;
    	border-top: 1px dashed transparent;
    	text-align: center;
    	padding-left: 20px;
    /*top: 93px;
    position: absolute;*/
    }
    
    #navcontainer #current {
    }
    
    #navcontainer #current:hover {
    }
    
    #navcontainer .currentAncestor {
    }
    
    /* Parent - Level 0 */
    
    #navcontainer ul{
    width: 830px;
    overflow: auto;
    margin: 8px 0 0;
    
    }
    
    #navcontainer li {
    	display: block; 
    	float:	left;
    	font: 1.3em Impact, Cracked, Arial Narrow;
    	text-transform: uppercase;}
    
    #navcontainer a {
    	 display: block; 
    	 padding: 0px 30px; 
    	 color: #fff; 
    	 text-decoration: none; 
    	 float:	left;
    	 }
    Read about clearing floats here - http://www.quirksmode.org/css/clearing.html - that's what I put overflow:auto; in some places for.
    Read why I got rid of your absolute positioning here - http://www.tyssendesign.com.au/artic...ning-pitfalls/
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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