Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-27-2009, 05:49 AM   PM User | #1
kevindosi
New to the CF scene

 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
kevindosi is an unknown quantity at this point
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
kevindosi is offline   Reply With Quote
Old 02-27-2009, 06:33 AM   PM User | #2
jhaycutexp
Regular Coder

 
Join Date: Apr 2008
Location: Manila, Philippines
Posts: 249
Thanks: 2
Thanked 12 Times in 12 Posts
jhaycutexp is an unknown quantity at this point
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..
jhaycutexp is offline   Reply With Quote
Old 02-27-2009, 09:29 AM   PM User | #3
effpeetee
Senior Coder

 
effpeetee's Avatar
 
Join Date: Feb 2007
Location: Clapham Junction - London SW
Posts: 4,884
Thanks: 228
Thanked 204 Times in 203 Posts
effpeetee is an unknown quantity at this point
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.
effpeetee is offline   Reply With Quote
Old 02-27-2009, 04:31 PM   PM User | #4
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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
Excavator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:02 AM.


Advertisement
Log in to turn off these ads.