...

View Full Version : Spacing is weird, help!



kevindosi
02-27-2009, 06:49 AM
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

jhaycutexp
02-27-2009, 07:33 AM
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..



*{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..

effpeetee
02-27-2009, 10:29 AM
You have some markup errors - here (http://validator.w3.org/check?uri=http%3A%2F%2Fwww.kevindosi.com%2Funtilreallife%2F&charset=%28detect+automatically%29&doctype=Inline&group=0).

Frank

Excavator
02-27-2009, 05:31 PM
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.

/* @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/articles/css/absolute-positioning-pitfalls/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum