Jump to content


Help please?


7 replies to this topic

#1 VenomGraphics

    Young Padawan

  • Members
  • Pip
  • 131 posts
  • Gender:Male
  • Location:Tampa, FL

Posted 31 July 2008 - 01:11 AM

http://chaosfyregrap...fire.net/code6/

Ok. As you can see, the layout here looks terrible.

I want the navigation and affiliates area to be on the left [They are in the "left" div.]

I want the marquee, feature and content areas in the middle [They are in the "middle" div.]

And I want the advertisement on the right [It's in the "advert" div.]

I have the divs set up the way I want, but for whatever reason, they just overlay each other, and the advert div just jumps below the other two. I've tried adjusting widths, but it didn't seem to do anything.

I'll post the code in a sec.

Ok, here it is -

HTML -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="style.css" />
<title>code6.com - A Need For Speed: Most Wanted fansite</title>
</head>

<body>

<div id="contain">

<div id="title">
Welcome to code6.com - A Need For Speed Most Wanted fansite!
</div>
<div id="header"></div>

<div id="content">

<div id="left">
<div id="navigation">
<div id="navihead">Navigation</div>
<div id="navi">
<ul id="navilist">
<li><a href="#" title="Back to the safehouse.">Safehouse (HOME)</a></li>
<li><a href="#" title="Gallery">Gallery</a></li>
<li><a href="#" title="Game tips and tricks">Hints and Tricks</a></li>
<li><a href="#" title="Check out the blacklist">Blacklist Rivals</a></li>
<li><a href="#" title="Staff">Staff</a></li>
<li><a href="#" title="Custom Cars">Custom Cars</a></li>
</ul>
</div>
<div id="navifoot"></div>
</div>

<div id="affiliates">
<div id="affhead">Affiliates</div>
<div id="affbody"></div>
<div id="afffoot"></div>
</div>
</div>
<div id="middle">

<div id="marquee_cont">
<div id="marq_top"></div>
<div id="marquee">

<marquee scrolldelay="100" onmouseover="this.stop();" onmouseout="this.start();">New screenshots added to the <a href="#" title="Gallery">gallery</a>!</marquee>

</div>

<div id="marq_bottom"></div>
</div>

<div id="featured">

<div id="featurehead">Featured Content</div>
<div id="featurebody">

</div>
<div id="featurefoot"></div>

</div>

<div id="main">

<div id="maintop">Header Here</div>
<div id="mainbody">

</div>
<div id="mainfoot"></div>

</div>

<div id="advertcont">

<div id="adverttop"></div>
<div id="advertbody"></div>
<div id="advertbottom"></div>

</div>

<div class="clr"></div>
</div>

</div>

<div id="footer">

</div>
</div>

</body>
</html>

CSS -
/* code6 CSS */
/* Author: James D. Headrick */
/* Website: http://chaosfyregraphix.exofire.net */
/* E-Mail: chaosfyre.graphix@gmail.com */

/* Classes */

.clr {
clear: both;
}

/* End Classes */

/* Basic Formatting */

body {
margin: 0;
padding: 0;
font-family: Verdana, Tahoma, Arial, "sans serif";
font-size: 62.5%;
}

html {
font-size: 100%;
}

a {
color: #e9e86a;
text-decoration: none;
}

a:hover {
background: #777;
}
/* End basic formatting */

/* Container Div */

#contain {
width: 830px;
margin: 0 auto 0 auto;
padding: 0 30px 0 30px;
}

/* End container div */


/* Top Area/Title Area */

#title {
background: url('images/title_bg.gif');
padding: 12px 0 10px 25px;
width: 815px;
height: 18px;
color: #777;
margin-bottom: 9px;
}

/* End Top Area/Title Area */

/* Header Image */

#header {
background: url('images/head.gif');
width: 840px;
height: 150px;
margin-bottom: 9px;
}

/* End header image */

/* Content Area */

#content {
width: 830px;
margin-bottom: 10px;
}

/* End content area */

/* Left hand content */
#left {
width: 195px;
}
/* End left hand content */

/* Navigation */

#navigation {
width: 195px;
margin-right: 5px;
float: left;
}

#navihead {
width: 175px;
height: 9px;
padding: 10px;
background: url('images/nav_head.gif');
}

#navi {
width: 185px;
background: #2a2924;
padding: 5px;
}

#navifoot {
width: 195px;
height: 10px;
background: url('images/nav_foot.gif');
margin-bottom: 10px;
}

/* End navigation */

/* Navi List */

ul#navilist {
margin: 5px 0 5px 0;
padding: 0;
}

ul#navilist li {
margin-bottom: 5px;
list-style: none;
line-height: 2.3em;
}

ul#navilist li a {
font-size: 1.0em;
color: #777;
text-decoration: none;
display: block;
}

ul#navilist li a:hover {
background: #777;
color: #e9e86a;
}

/* End Navi list */

/* Affiliates */

#affiliates {
width: 195px;
margin-right: 5px;
float: left;
}

#affhead {
width: 175px;
height: 10px;
padding: 10px;
background: url('images/aff_head.gif');
}

#affbody {
width: 185px;
padding: 5px;
background: #2a2924;
}

#afffoot {
width: 195px;
height: 10px;
background: url('images/aff_foot.gif');
}

/* End affiliates */

/* Middle Content */
#middle {
width: 455px;
margin-right: 5px;
}
/* End middle content */

/* Marquee */
#marquee_cont {
width: 455px;
margin-bottom: 10px;
}

#marq_top {
width: 455px;
height: 7px;
background: url('images/marquee_top.gif');
}

#marquee {
background: #2a2924;
width: 445px;
height: 13px;
padding: 5px;
color: #777;
}

#marq_bottom {
width: 455px;
height: 7px;
background: url('images/marquee_bottom.gif');
}
/* End marquee */

/* Featured */
#featured {
width: 455px;
height: 145px;
margin-bottom: 10px;
}

#featurehead {
width: 435px;
height: 8px;
padding: 10px;
background: url('images/feature_top.gif');
}

#featurebody {
width: 445px;
height: 100px;
padding: 5px;
background: #2a2924;
}

#featurefoot {
width: 455px;
height: 7px;
background: url('images/feature_bottom.gif');
}
/* End featured */

/* Main Content */
#main {
width: 455px;
height: 412px;
}

#maintop {
width: 435px;
height: 12px;
background: url('images/main_top.gif');
padding: 10px;
}

#mainbody {
width: 445px;
height: 360px;
padding: 5px;
background: #2a2924;
}

#mainfoot {
width: 455px;
height: 10px;
background: url('images/main_bottom.gif');
}
/* End Main Content */

/* Advert */
#advertcont {
width: 180px;
height: 620px;
}

#adverttop {
width: 180px;
height: 10px;
background: url('images/ad_top.gif');
}

#advertbody {
width: 170px;
height: 601px;
padding-left: 5px;
padding-right: 5px;
background: #2a2924;
}

#advertbottom {
width: 180px;
height: 10px;
background: url('images/ad_bottom.gif');
}
/* End advert */

/* Footer */
#footer {
width: 840px;
height: 36px;
background: url('images/footer.gif');
}
/* End footer */


PLEASE help!

#2 Tyson D

    Young Padawan

  • Members
  • Pip
  • 85 posts
  • Gender:Male
  • Location:Canada

Posted 31 July 2008 - 08:57 AM

Hey there SniperFox,
I will help you get started with fixing things up, just so you don't get down about anything, for now I'd recommend not looking at your page in IE. :P

First thing I'd suggest is that you tab out your code when you're working with it, this will help you spot errors like the one you've made. If you go to your HTML code, you'll notice just before the advertcont div that you didn't actually close the middle div. You'll need another </div> tag above advertcont if you really want it to go on the right.

Next, you're going to want to probably float the three sections left so they all end up beside each other, I've got a feeling you're going to have a width issue so I'd suggest making your advert div a little less wide, try making it smaller 10px at a time and see what you get, you'll have to adjust spacing I'm sure.

So after you've got them all floating left, you'll probably want your footer div to be moved just under the clear div if you want it to stay centered (or you can edit the CSS, but you'll have to do something otherwise it's going to end up on the left).

Alright that should get you started in the right direction you'll still have spacing/width issues to work out afterwards but I'll leave that to you unless you get stuck. You'll also want to check things out in IE after as well (unfortunately).

Good luck!

#3 VenomGraphics

    Young Padawan

  • Members
  • Pip
  • 131 posts
  • Gender:Male
  • Location:Tampa, FL

Posted 31 July 2008 - 03:25 PM

Thanks for the help man, however, I'm still having problems.

No longer do the divs overlap each other, but for some reason, the "middle" div, while centered, isn't where it should be. It's like it's stuck somewhere inside the "affiliates" div.

The advertcont div seems to be suffering from it as well, because it lines up just fine beside the middle div, but it's down too low as well.

To top it off, for some reason, the middle div is automatically giving itself a height of 614px. I have absolutely no clue why. Because of this, it's pushing the footer waaaaaaaaay down on the page, and that's not what I want at all.

This is how it should look:

Posted Image


And of course, this is how it actually looks: http://chaosfyregrap...ofire.net/code6

I just can't seem to pinpoint what's causing this to happen >_<.

Here's the new code, btw:

HTML --
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="style.css" />
<title>code6.com - A Need For Speed: Most Wanted fansite.</title>
</head>

<body>

<div id="contain">

	<div id="title">
		Welcome to code6.com - A Need For Speed Most Wanted fansite!
	</div>

	
	<div id="header"></div>
		
		<div id="left">
		
			<div id="navigation">
		
			<div id="navihead">Navigation</div>
		
			<div id="navi">
		
				<ul id="navilist">
					<li><a href="#" title="Back to the safehouse.">Safehouse (HOME)</a></li>
					<li><a href="#" title="Gallery">Gallery</a></li>

					<li><a href="#" title="Game tips and tricks">Hints and Tricks</a></li>
					<li><a href="#" title="Check out the blacklist">Blacklist Rivals</a></li>
					<li><a href="#" title="Staff">Staff</a></li>
					<li><a href="#" title="Custom Cars">Custom Cars</a></li>
		
			  </ul>
		
			  </div>
		
			<div id="navifoot"></div>

		
			</div>
	
			<div id="affiliates">
			
				<div id="affhead">Affiliates</div>
			
				<div id="affbody"></div>
			
				<div id="afffoot"></div>
			
			</div>
	
		</div>
	
		<div id="middle">

	
			<div id="marquee_cont">
			<div id="marq_top"></div>
			<div id="marquee">
	
				New screenshots added to the <a href="#" title="Gallery">gallery</a>!
	
			</div>
	
			<div id="marq_bottom"></div>
		</div>
	
			<div id="featured">

			
				<div id="featurehead">Featured Content</div>
				<div id="featurebody">
				
				</div>
				<div id="featurefoot"></div>
			
			</div>
	
			<div id="main">
			
				<div id="maintop">Header Here</div>
				<div id="mainbody">

				
				</div>
				<div id="mainfoot"></div>
			
			</div>
			
		</div>
		  
		<div id="advertcont">
			
				<div id="adverttop"></div>
				<div id="advertbody"></div>
				<div id="advertbottom"></div>
			
		</div>

		
		<div class="clr"></div>
	</div>
	
	<div id="footer">
		
	</div>

</body>
</html>

CSS --
/* code6 CSS */
/* Author: James D. Headrick */
/* Website: http://chaosfyregraphix.exofire.net */
/* E-Mail: chaosfyre.graphix@gmail.com */

/* Classes */

.clr {
	clear: both;
}

/* End Classes */

/* Basic Formatting */

body {
	margin: 0;
	padding: 0;
	font-family: Verdana, Tahoma, Arial, "sans serif";
	font-size: 62.5%;
}

html {
	font-size: 100%;
}

a {
	color: #e9e86a;
	text-decoration: none;
}

a:hover {
	background: #777;
}
/* End basic formatting */

/* Container Div */

#contain {
	width: 850px;
	height: auto;
	margin: 0 auto 0 auto;
	padding: 0 20px 0 20px;
}

/* End container div */


/* Top Area/Title Area */

#title {
	background: url('images/title_bg.gif');
	padding: 12px 0 10px 25px;
	width: 815px;
	height: 18px;
	color: #777;
	margin-bottom: 9px;
}

/* End Top Area/Title Area */

/* Header Image */

#header {
	background: url('images/head.gif');
	width: 840px;
	height: 150px;
	margin-bottom: 9px;
}

/* End header image */

/* Content Area */

#content {
	width: 840px;
	margin-bottom: 5px;
}

/* End content area */

/* Left hand content */
#left {
	width: 195px;
	margin-right: 5px;
}
/* End left hand content */

/* Navigation */

#navigation {
	width: 195px;
	float: left;
}

#navihead {
	width: 175px;
	height: 9px;
	padding: 10px;
	background: url('images/nav_head.gif');
}

#navi {
	width: 185px;
	background: #2a2924;
	padding: 5px;
}

#navifoot {
	width: 195px;
	height: 10px;
	background: url('images/nav_foot.gif');
	margin-bottom: 10px;
}

/* End navigation */

/* Navi List */

ul#navilist {
	margin: 5px 0 5px 0;
	padding: 0;
}

ul#navilist li {
	margin-bottom: 5px;
	list-style-type: none;
	line-height: 2.3em;
}

ul#navilist li a {
	font-size: 1.0em;
	color: #777;
	text-decoration: none;
	display: block;
}

ul#navilist li a:hover {
	background: #777;
	color: #e9e86a;
}

/* End Navi list */

/* Affiliates */

#affiliates {
	width: 195px;
	float: left;
}

#affhead {
	width: 175px;
	height: 10px;
	padding: 10px;
	background: url('images/aff_head.gif');
}

#affbody {
	width: 185px;
	padding: 5px;
	background: #2a2924;
}

#afffoot {
	width: 195px;
	height: 10px;
	background: url('images/aff_foot.gif');
}

/* End affiliates */

/* Middle Content */
#middle {
	width: 455px;
	height: auto;
	margin-right: 5px;
	float: left;
	margin-top: 0;
}
/* End middle content */

/* Marquee */
#marquee_cont {
	width: 455px;
	margin-bottom: 10px;
}

#marq_top {
	width: 455px;
	height: 7px;
	background: url('images/marquee_top.gif');
}

#marquee {
	background: #2a2924;
	width: 445px;
	height: 13px;
	padding: 5px;
	color: #777;
	text-align: center;
}

#marq_bottom {
	width: 455px;
	height: 7px;
	background: url('images/marquee_bottom.gif');
}
/* End marquee */

/* Featured */
#featured {
	width: 455px;
	height: 145px;
	margin-bottom: 10px;
}

#featurehead {
	width: 435px;
	height: 8px;
	padding: 10px;
	background: url('images/feature_top.gif');
}

#featurebody {
	width: 445px;
	height: 100px;
	padding: 5px;
	background: #2a2924;
}

#featurefoot {
	width: 455px;
	height: 7px;
	background: url('images/feature_bottom.gif');
}
/* End featured */

/* Main Content */
#main {
	width: 455px;
	height: 412px;
}

#maintop {
	width: 435px;
	height: 12px;
	background: url('images/main_top.gif');
	padding: 10px;
}

#mainbody {
	width: 445px;
	height: auto;
	padding: 5px;
	background: #2a2924;
}

#mainfoot {
	width: 455px;
	height: 10px;
	background: url('images/main_bottom.gif');
}
/* End Main Content */

/* Advert */
#advertcont {
	width: 180px;
	height: auto;
	float: left;
}

#adverttop {
	width: 180px;
	height: 10px;
	background: url('images/ad_top.gif');
}

#advertbody {
	width: 170px;
	height: auto;
	padding-left: 5px;
	padding-right: 5px;
	background: #2a2924;
}

#advertbottom {
	width: 180px;
	height: 10px;
	background: url('images/ad_bottom.gif');
}
/* End advert */

/* Footer */
#footer {
	width: 840px;
	height: 36px;
	background: url('images/footer.gif');
	margin: 0 auto 0 auto;
}
/* End footer */


#4 Tyson D

    Young Padawan

  • Members
  • Pip
  • 85 posts
  • Gender:Male
  • Location:Canada

Posted 31 July 2008 - 03:47 PM

First of all, you still aren't floating the proper thing left. You don't need float: left for your navigation and your affiliates, you DO need float left in #left, and since you define a width there and #left contains Navigation and Affiliates, they will be confined in there and should behave how you want them to. I'll post more as I figure out your footer issue.

Edit: It looks like the culprit of the footer being pushed down is here:

/* Main Content */
 #main {
	 width: 455px;
	 height: 412px;
 }


If you set this height to auto instead or even just remove the height property it should bring your footer up.

If you still want to have that main thing be the same height, I'd erase the height: 412px completely and update your #mainbody to look like this:

#mainbody {
	width: 445px;
	height: 400px;
	padding: 5px;
	background: #2a2924;
}

I would also add some margin-top on your footer as well! You might still have some lining up to do... you've got a lot of extra unnecessary CSS in there which could also make things less confusing if you removed it!

Cheers.

Edited by Tyson D, 31 July 2008 - 04:00 PM.


#5 VenomGraphics

    Young Padawan

  • Members
  • Pip
  • 131 posts
  • Gender:Male
  • Location:Tampa, FL

Posted 31 July 2008 - 06:12 PM

Thanks man. I'll try that out once I get home. I'm in class right now, so I can't just yet. I'll update if anything else goes wrong, lol.

#6 Tyson D

    Young Padawan

  • Members
  • Pip
  • 85 posts
  • Gender:Male
  • Location:Canada

Posted 31 July 2008 - 06:16 PM

Hey no problem!
Sure thing, I will continue to be available to look at this when I find time! :P

#7 VenomGraphics

    Young Padawan

  • Members
  • Pip
  • 131 posts
  • Gender:Male
  • Location:Tampa, FL

Posted 31 July 2008 - 11:36 PM

Dude, thanks SO much. It looks perfect now :P [In both IE and FF.]

I knew once we figured out what was wrong with the main content area and the affiliates area, it'd be fixed in IE.

Take a look: http://chaosfyregrap...fire.net/code6/

#8 Tyson D

    Young Padawan

  • Members
  • Pip
  • 85 posts
  • Gender:Male
  • Location:Canada

Posted 01 August 2008 - 08:44 AM

Woohoo!!!
Great work it is looking nice. So glad you got things sorted out. Keep it up :google:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users