Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Special Interests > Web Design and Development
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread  
Old Aug 9, 2008, 06:38 AM   #1
joe8232
macrumors regular
 
Join Date: Jun 2005
Quick CSS help - stopping divs overlapping

I am having some problems with a couple of div's on a webpage I am developing. The site is here.

The problem is with the bottom div - it seems to overlap the two above it. The CSS I have used is:

#leftNav {
width:170px;
padding:0;
margin-right:10px;
float:left;
}
#center {
float:left;
background-color:#fff;
color:#000;
width:680px;
padding:15px 15px 15px 15px;
margin-bottom:30px;
margin-left:10px;
margin-top:20px;
}
#footer {
clear:both;
width:100%;
padding:2px 2px 2px 2px;
border-top:1px dashed #2E4C6F;
border-bottom:1px dashed #2E4C6F;
}

EDIT: I can fix it by adding margin-bottom:150px to leftNav but I really don't understand why that fixes it.
Any help would be much appreciated.
joe8232 is offline   Reply With Quote
Old Aug 9, 2008, 07:30 AM   #2
angelwatt
macrumors 601
 
Join Date: Aug 2005
Location: Dayton, OH
The problem is you define #leftNav twice.
Code:
/* LeftNav bar */
#leftNav {
	width:170px;
	height:300px;
	padding:0;
	margin-right:10px;
	float:left;
	margin-bottom:100px;
	margin-top:0;
}
/* LeftNav bar */
#leftNav {
	width:170px;
	padding:0;
	margin-right:10px;
	float:left;
}
Combine these together then get ride of the height property and adjust the margin-bottom appropriately. Also, I noticed that the reference to list.css returned a 404 error. Something to look into.
angelwatt is online now   Reply With Quote
Old Aug 9, 2008, 07:37 AM   #3
joe8232
Thread Starter
macrumors regular
 
Join Date: Jun 2005
Thanks for that - such a stupid mistake Will look into that 404 as well. Thanks again
joe8232 is offline   Reply With Quote

Reply

Mac Forums > Special Interests > Web Design and Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:43 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright 2002-2009, MacRumors.com, LLC