HTML/CSS Help!

Associate
Joined
4 Jul 2011
Posts
690
Location
United Kingdom
I'm creating a website for my final module at college and I'm having great difficulty in understanding the way in which divs work and how to position them and such.

I've got a design idea for my website, and I'm now trying to code it to replicate said design.

I'm having two issues, how do I create those divs in the design and ensure that they are all aligned properly?

Second, when I resize the browser window, the navigation goes onto two lines. Is there a way of making it stay as it is no matter the window size?

Cheers!

P.S I know how awful the code looks, sorry in advance! :(

Design: http://localhostr.com/files/zApJHTV/design.png

Current Code:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">

<html><head>
<title>Fancy That</title>
 
<style type="text/css"> 
 
	
	body {
		margin:10px 10px 0px 10px;
		padding:0px;
        background-color:#eeeee9;
        font-family:"Calibri", Arial, Georgia;

		}
 
	#centercontent {
		background:#fff;
        margin:auto;
        margin-top:20px;
		border:1px solid #000;
        text-align:justify;
		}

	html>body #centercontent {
   		margin-left:201px;
   		margin-right:201px;
		}
		
	#search {
		background:#fff;
		height:20px;
		margin:auto;
        margin-left:201px;
        margin-right:201px;
		margin-top:20px;
		background-color:#eeeee9;

	}
		
	#search a {
		display:inline block;
		padding:3px;             
		font-weight:none;
		color:#000;
		font-size:16px;
		text-decoration:none;
		font-family:Calibri;

		
        
	}
	
	#basket {
		background:#fff;
		height:20px;
		background-color:#eeeee9;
		float:right;
		font-size:16px;

		
	}

	#login {
		background:#fff;
		height:20px;
		background-color:#eeeee9;
		float:left;
		font-size:16px;

		
	}

	#search a:hover {
		color:#818d91;
        text-decoration:underline;
        }

	#banner {
		height:300px;
        margin:auto;
        margin-left:201px;
        margin-right:201px;
		margin-top:10px;
		margin-bottom:20px;
		border:1px solid #000;
		
		
		}

         #nav {
		padding:5px;
		list-style:none;
		margin:0;
		margin-top:3px;
		text-align:center;
        font-family:"Georgia";
        position:relative;
        letter-spacing:2px;
		word-spacing:75px;
				

		
		}

    #nav li {
	    display:inline;


		}

	#nav li a {
		display:inline block;
		padding:3px;             
		text-decoration:none;
		font-weight:none;
		color:#000;
		font-size:25px;
                

		}

	#nav li a:hover {
                
		color:#818d91;
        text-decoration:underline;
		

		}

	html>body #banner {
		height:90px;
		}
		
	p,h1,pre {
		margin:0px 10px 10px 10px;
		}

	#banner p {
		padding:30px 5px 5px 50px;
		text-align:center;
		font-weight:bold;
		font-family: "Georgia";

	}
		
	h1 {
		font-size:14px;
		padding-top:10px;
		}
		
	#banner h1 {
		font-size:30px;
		padding:10px 10px 0px 10px;
		margin:0px;
        text-align:center;
		}
	
	#rightcontent p {
		font-size:10px
		}
</style>
	</head>

<body>
<div id="search">
<div id="basket">
<a href="#">Checkout! £10.99</a>
</div>
<div id="login">
Hello! /<a href="#">Sign In</a>/<a href="#">Register</a>
</div>
</div>

<div id="banner">
<p>Fancy That!</p>
</div>

<ul id="nav">

	<li><a href="#">MENS</a></li>
	<li><a href="#">WOMENS</a></li>
	<li><a href="#">CHILDREN</a></li>
	<li><a href="#">SALE</a></li>
	<li><a href="#">NEWS</a></li>
	<li><a href="#">CONTACT</a></li>
</ul>
 
<div id="centercontent">
<h1>Title</h1>
	<p>
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. 
	</p>
<p>
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
	</p>
<p>
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
	</p>
<p>
 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
	</p>
	<br />


 </div>
</font> 
</body>
</html>
 
To stop the nav going on to a new line, you should put the following into the #nav section of your CSS


white-space:nowrap;

I'll read the rest and reply as I go :p
 
a) I would use a fixed/fluid grid
b) set a min width

Edit:
In your code:
display: inline block;

should be:
display: inline-block;
 
Last edited:
Thanks uniQ, I changed them both but it turns out that it changes my navigation quite drastically to what it looked like before :P I'll work around it though.

And the Fixed/Fluid grid is something I was looking to use, but we were given a basic DIV layout and told to go crazy with it. Would it be possible to move to a fixed/fluid grid layout now? If so, how can I go about it?

Thanks.
 
Here's some messy code and bright borders I chucked together quickly for you to maybe get some ideas from.... Tomorrow i'll look at cleaning it up, getting the gaps in between the divs and moving the style's to CSS :p

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">

<html><head>
<title>Fancy That</title>
 
<style type="text/css"> 
 
	
	body {
		margin:10px 10px 0px 10px;
		padding:0px;
        background-color:#eeeee9;
        font-family:"Calibri", Arial, Georgia;

		}
 
	#centercontent {
		
        margin:auto;
        margin-top:20px;
		
        text-align:justify;
		}

	html>body #centercontent {
   		margin-left:201px;
   		margin-right:201px;
		}
		
	#search {
		background:#fff;
		height:20px;
		margin:auto;
        margin-left:201px;
        margin-right:201px;
		margin-top:20px;
		background-color:#eeeee9;

	}
		
	#search a {
		display:inline block;
		padding:3px;             
		font-weight:none;
		color:#000;
		font-size:16px;
		text-decoration:none;
		font-family:Calibri;

		
        
	}
	
	#basket {
		background:#fff;
		height:20px;
		background-color:#eeeee9;
		float:right;
		font-size:16px;

		
	}

	#login {
		background:#fff;
		height:20px;
		background-color:#eeeee9;
		float:left;
		font-size:16px;

		
	}

	#search a:hover {
		color:#818d91;
        text-decoration:underline;
        }

	#banner {
		height:300px;
        margin:auto;
        margin-left:201px;
        margin-right:201px;
		margin-top:10px;
		margin-bottom:20px;
		border:1px solid #000;
		
		
		}

         #nav {
		padding:5px;
		list-style:none;
		margin:0;
		margin-top:3px;
		text-align:center;
        font-family:"Georgia";
        position:relative;
        letter-spacing:2px;
		word-spacing:75px;
		white-space:nowrap;				

		
		}

    #nav li {
	    display:inline;


		}

	#nav li a {
		display:inline block;
		padding:3px;             
		text-decoration:none;
		font-weight:none;
		color:#000;
		font-size:25px;
                

		}

	#nav li a:hover {
                
		color:#818d91;
        text-decoration:underline;
		

		}

	html>body #banner {
		height:90px;
		}
		
	p,h1,pre {
		margin:0px 10px 10px 10px;
		}

	#banner p {
		padding:30px 5px 5px 50px;
		text-align:center;
		font-weight:bold;
		font-family: "Georgia";

	}
		
	h1 {
		font-size:14px;
		padding-top:10px;
		}
		
	#banner h1 {
		font-size:30px;
		padding:10px 10px 0px 10px;
		margin:0px;
        text-align:center;
		}
	
	#rightcontent p {
		font-size:10px
		}
</style>
	</head>

<body>
<div id="search">
<div id="basket">
<a href="#">Checkout! £10.99</a>
</div>
<div id="login">
Hello! /<a href="#">Sign In</a>/<a href="#">Register</a>
</div>
</div>

<div id="banner">
<p>Fancy That!</p>
</div>

<ul id="nav">

	<li><a href="#">MENS</a></li>
	<li><a href="#">WOMENS</a></li>
	<li><a href="#">CHILDREN</a></li>
	<li><a href="#">SALE</a></li>
	<li><a href="#">NEWS</a></li>
	<li><a href="#">CONTACT</a></li>
</ul>
 
<div id="centercontent">
	<div style="border:1px solid #ff0000;display:inline-block;">
		<div style="float:left;width:33%; border:1px solid #ff0000;">
			<div style="border:1px solid #00ff00;">Top section</div>

			<div style="border:1px solid #0000ff;">Bottom section</div>
		</div>

		<div style="float:left;width:33%; border:1px solid #00ff00;;">Top 2<br />....</div>
		<div style="float:left;width:33%; border:1px solid #0000ff;">Top 3<br />.....</div>
	</div>

	<div style="clear:both;">&nbsp;</div>
	
	<div style="border:1px solid #ff0000;display:inline-block;">
		<div style="float:left;width:66%; border:1px solid #ff0000;">Bottom 1</div>
		<div style="float:left;width:33%; border:1px solid #00ff00;">Bottom 2</div>
	</div>
 
 
</div>
</font> 
</body>
</html>
 
Hey guys,

I had a look around for some tutorials and such, and I've come up with the following:

http://betafixit.com/fancythat

It's working as intended but I've come up with a few issues.

If you navigate to the http://betafixit.com/fancythat/mens.html I have two columns of fancy dress outfits, but I would like to change this to 4 columns.

I've tried changing the size of the divs and then inserting the same div twice but that ****s everything up completely.

I'd like it to look something like this: http://localhostr.com/files/X2hwNYI/example.png

CSS:

Code:
/* MAIN */

body {
  font-family: arial,verdana,tahoma,helvetica,sans-serif;
  font-size: 85%;
  color: #777;
  margin: 0;
  padding: 0;
  background: #e7e7e7;
}
 
#wrapper {
  width: 920px;
  min-height: 1000px;
  margin: 30px auto 0 auto;
  padding: 30px;
  background: #fff;
  border: 1px solid #ccc;
  overflow: hidden;
}

#logo {
  float: left;
  width: 10px;
  height: 100px;
}

#nav {
  float: right;
  width: 620px;
  height: 100px;
}

.left {
  float: left;
  width: 220px;
  margin: 100px 20px 0 0;
  text-align: justify;
}

.right {
  float: right;
  width: 220px;
  margin: 0 0 0 20px;  
}

.leftbottom {
  float: left;
  width: 440px;
  margin: 0 20px 0 0;
  text-align: justify;
}

.rightbottom {
  float: right;
  width: 440px;
  margin: 0 0 0 20px;  
}


#footer {
  width: 980px;
  height: 60px;
  margin: 0 auto;
  clear: both;
}

/* NAVIGATION */

#nav ul {
  float: right;
  margin: 30px 0 0 0;
  padding: 0;
  list-style: none;
}

#nav li {
  float: left;
  display: inline;
  font-size: 1.0em;
  color: #bbb;
  margin: 0 0 0 16px;
  padding: 0;
}

#nav li a {
  color: #111;
  text-decoration: none;
  padding: 7px 9px;
  background: #fff;
}

#nav li a:hover {
  color: #fff;
  text-decoration: none;
  background: #111;
}

#footer ul {
  float: left;
  margin: 0;
  padding: 0;
  list-style: none;
}

#footer li {
  float: left;
  display: inline;
  font-size: 0.9em;
  line-height: 60px;
  color: #999;
  margin: 0 16px 0 0;
  padding: 0;
}

#footer li a {
  color: #999;
  text-decoration: underline;
}

#footer li a:hover {
  color: #111;
  text-decoration: underline;
}

/* TYPOGRAPHY */

#wrapper h1 {
  font-size: 2.8em;
  font-weight: normal;
  line-height: 1.1em;
  letter-spacing: -2px;
  color: #bbb;
  margin: 0;
  padding: 0;
}

#wrapper h1 a, #wrapper h3 a {
  color: #111;
  text-decoration: none;
}

#wrapper h1 a:hover, #wrapper h3 a:hover {
  color: #fff;
  text-decoration: none;
  background: #111;
}

#wrapper h3 {
  font-size: 1.8em;
  font-weight: normal;
  line-height: 1.0em;
  letter-spacing: -1px;
  color: #111;
  margin: 48px 0 18px 0;
  padding: 0 0 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

#wrapper p {
  font-size: 1.0em;
  line-height: 1.5em;
  margin: 0 0 24px 0;
}

#main p a, #main li a {
  color: #111;
  text-decoration: underline;
}

#main p a:hover, #main li a:hover {
  color: #999;
  text-decoration: underline;
}

#main p a.btn {
  color: #fff;
  text-decoration: none;
  padding: 7px 9px;
  background: #111;
}

#main p a:hover.btn {
  color: #fff;
  text-decoration: none;
  padding: 7px 9px;
  background: #aaa;
}

#main ul {
  margin: 0 0 0 14px;
  padding: 0;
  list-style: square;
}

#main li {
  font-size: 1.0em;
  line-height: 1.5em;
  margin: 0;
  padding: 6px 0;
}

br.clearit {
  clear: both;
}

/* IMAGES */

.left img, .right img {
  margin: 0 0 20px 0;
  border: 0;
}

#logo img {
  border: 0;
}

/* FORMS */

form,fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

label {
  display: block;
  font-family: arial,verdana,tahoma,helvetica,sans-serif;
  font-size: 1.0em;
  margin: 0 0 5px 0;
}

input.field, textarea.field {
  display: block;
  font-family: arial,verdana,tahoma,helvetica,sans-serif;
  font-size: 1.0em;
  color: #111;
  margin: 0 0 20px 0;
  padding: 7px;
  background: #f5f5f5;
  border: 1px solid #ddd;
}

input.field:focus, textarea.field:focus {
  color: #fff;
  background: #111;
  border: 1px solid #111;
}

input.button {
  font-size: 1.0em;
  color: #111;
  padding: 3px 4px;
}

#listimg {
    display: inline-block;
    margin: 5px 20px;
    padding: 5px;    
}

#imgcontainer{
    text-align:center;    
    border:1px solid #666;
}

and HTML for mens.html

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<head>

<title>Fancy That!</title>

<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
<link rel="shortcut icon" href="img/favicon.ico" />

</head>

<body>
	
<!-- WRAPPER -->
<div id="wrapper">

<!-- LOGO -->
<div id="logo">
<a href="#"><img src="img/logo.png" alt="Site name for SEO" /></a>
</div>
<!-- END LOGO -->

<!-- NAV -->
<div id="nav">
<ul>
<li><a href="index.html" title="Home">HOME</a></li>
<li>/</li>
<li><a href="mens.html" title="Mens Costumes">MENS</a></li>
<li>/</li>
<li><a href="womens.html" title="Womens Costumes">WOMENS</a></li>
<li>/</li>
<li><a href="children.html" title="Childrens Costumes">CHILDREN</a></li>
<li>/</li>
<li><a href="blog.html" title="Blog">BLOG</a></li>
<li>/</li>
<li><a href="contact.html" title="Contact">CONTACT</a></li>
</ul>
</div>
<!-- NAV -->

<!-- MAIN -->
<div id="main">

<div class="left">
<h3><a href="#" title="Title for SEO">Mens Costumes</a></h3>
<div class="listimg">
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
</div>
<div class="listimg">
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
</div>
<div class="listimg">
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
</div>
<div class="listimg">
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
</div>
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
</div>



<div class="right">
<h3><a href="#" title="Title for SEO">Mens Costumes</a></h3>
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
<img src="img/men1.jpg" alt="ALT text for SEO" />
<p>Batman Costume</p>
<p>£31.99</p>
</div>



</div>


<div class="leftbottom">
<h3>Want to hear about our latest costumes?</h3>
<p>Keep up to date of the latest costumes and be notified in advance of our costume sales
by simply subscribing to our mailing list below!</p>
<form action="#" method="post">
<fieldset>
<label for="name">Name</label>
<input type="text" id="name" size="35" class="field" />
<label for="email">Email</label>
<input type="text" id="email" size="35" class="field" />
<input type="submit" value="Subscribe" class="button" />
</fieldset>
</form>
</div>

<div class="rightbottom">
<h3>Need help?</h3>
<form action="#" method="post">
<fieldset>
<label for="name">Name</label>
<input type="text" id="name" size="35" class="field" />
<label for="email">Email</label>
<input type="text" id="email" size="35" class="field" />
<label for="comments">How can we help you?</label>
<textarea rows="6" cols="60" id="comments" class="field"></textarea>
<input type="submit" value="Send message" class="button" />
</fieldset>
</form>
</div>

</div>
<!-- MAIN -->

</div>
<!-- WRAPPER -->

<!-- FOOTER -->
<div id="footer">
<ul>
<li>&copy; 2012 Fancy That! </li>
<li>/</li>
<li><a href="#">RSS</a></li>
<li>/</li>
<li><a href="#">Contact</a></li>
<li>/</li>
<li><a href="#">FAQ</a></li>
<li>/</li>
<li><a href="#">Sitemap</a></li>
</ul>
</div>
<!-- FOOTER -->

</body>
</html>

Thanks in advance!
 
If you want them to be closer together should probably stop them from being float:left and float:right if that messes up to badly add a margin-right: and just move it further left
 
I've fixed it :)

Made 4 new divs and set their widths to certain amounts whilst floating them all left.

Code:
.costumes1, .costumes2, .costumes3, .costumes4 {
    float: left;
    width: 90px;
    height: 100px;
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 170px;
}
 
Last problem which I seem to be unable to solve is the links at the top of the page for login and checkout. If I zoom in and out of the page it makes the links go outside of the wrapper area. I'd like them to stay in line with the content all the time.

HTML:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<head>

<title>Fancy That!</title>

<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
<link rel="shortcut icon" href="img/favicon.ico" />
</head>

<body>

	<div id="login">
<ul>
<li>Hello! <a href="#">Sign in</a> / <a href="#">Register</a></li>
</ul>
</div>

<div id="checkout">
<ul>
<li><img src="img/cart.png"> <a href="#">Checkout!</a> / <a href="#">£10.99</a></li>
</ul>
</div>

<!-- WRAPPER -->
<div id="wrapper">

<!-- LOGO -->
<div id="logo">
<a href="#"><img src="img/logo.png" alt="Site name for SEO" /></a>
</div>
<!-- END LOGO -->

<!-- NAV -->
<div id="nav">
<ul>
<li><a href="index.html" title="Home">HOME</a></li>
<li>/</li>
<li><a href="mens.html" title="Mens Costumes">MENS</a></li>
<li>/</li>
<li><a href="womens.html" title="Womens Costumes">WOMENS</a></li>
<li>/</li>
<li><a href="children.html" title="Childrens Costumes">CHILDREN</a></li>
<li>/</li>
<li><a href="blog.html" title="Blog">BLOG</a></li>
<li>/</li>
<li><a href="contact.html" title="Contact">CONTACT</a></li>
</ul>
</div>
<!-- END NAV -->

<!-- MAIN CONTENT -->
<div id="main">

<div class="left">
<h3><a href="#" title="Title for SEO">Mens Costumes</a></h3>
<img src="img/1.png" alt="ALT text for SEO" />
<p><a href="#" class="btn">Browse All &nbsp &nbsp &nbsp &nbsp&raquo;</a></p>
</div>

<div class="right">
<h3><a href="#" title="Title for SEO">Womens Costumes</a></h3>
<img src="img/2.png" alt="ALT text for SEO" />
<p><a href="#" class="btn">Browse All &nbsp &nbsp &nbsp &nbsp&raquo;</a></p>
</div>

<div class="left">
<h3><a href="#" title="Title for SEO">Childrens Costumes</a></h3>
<img src="img/3.png" alt="ALT text for SEO" />
<p><a href="#" class="btn">Browse All &nbsp &nbsp &nbsp &nbsp&raquo;</a></p>
</div>

<div class="right">
<h3><a href="#" title="Title for SEO">Pets Costumes</a></h3>
<img src="img/4.png" alt="ALT text for SEO" />
<p><a href="#" class="btn">Browse All &nbsp &nbsp &nbsp &nbsp&raquo;</a></p>
</div>

<div class="left">
<h3><a href="#" title="Title for SEO">Womens Sale Costumes</a></h3>
<img src="img/5.png" alt="ALT text for SEO" />
<p><a href="#" class="btn">Browse All &nbsp &nbsp &nbsp &nbsp&raquo;</a></p>
</div>

<div class="right">
<h3><a href="#" title="Title for SEO">Mens Sale Costumes</a></h3>
<img src="img/5.png" alt="ALT text for SEO" />
<p><a href="#" class="btn">Browse All &nbsp &nbsp &nbsp &nbsp&raquo;</a></p>
</div>

<div class="leftbottom">
<h3>Want to hear about our latest costumes?</h3>
<p>Keep up to date of the latest costumes and be notified in advance of our costume sales
by simply subscribing to our mailing list below!</p>
<form action="#" method="post">
<fieldset>
<label for="name">Name</label>
<input type="text" id="name" size="35" class="field" />
<label for="email">Email</label>
<input type="text" id="email" size="35" class="field" />
<input type="submit" value="Subscribe" class="button" />
</fieldset>
</form>
</div>

<div class="rightbottom">
<h3>Need help?</h3>
<form action="#" method="post">
<fieldset>
<label for="name">Name</label>
<input type="text" id="name" size="35" class="field" />
<label for="email">Email</label>
<input type="text" id="email" size="35" class="field" />
<label for="comments">How can we help you?</label>
<textarea rows="6" cols="60" id="comments" class="field"></textarea>
<input type="submit" value="Send message" class="button" />
</fieldset>
</form>
</div>

</div>
<!-- END MAIN CONTENT -->

</div>
<!-- END WRAPPER -->

<!-- FOOTER -->
<div id="footer">
<ul>
<li>&copy; 2012 Fancy That! </li>
<li>/</li>
<li><a href="#">RSS</a></li>
<li>/</li>
<li><a href="#">Contact</a></li>
<li>/</li>
<li><a href="#">FAQ</a></li>
<li>/</li>
<li><a href="#">Sitemap</a></li>
</ul>
</div>
<!-- END FOOTER -->

</body>
</html>

CSS:

Code:
/* MAIN */

body {
  font-family: arial,verdana,tahoma,helvetica,sans-serif;
  background-image: ('img/bg2.png');
  font-size: 85%;
  color: #777;
  margin: 0;
  padding: 0;
  background: #e7e7e7;
}
 
#wrapper {
  width: 920px;
  min-height: 1000px;
  margin: 20px auto 0 auto;
  padding: 30px;
  background: #fff;
  border: 1px solid #ccc;
  overflow: hidden;
}

#logo {
  float: left;
  width: 100px;
  height: 100px;
}

#nav {
  float: right;
  width: 620px;
  height: 100px;
}

.left {
  float: left;
  width: 440px;
  margin: -40px 10px 0 0;
  text-align: justify;
}

.blogleft {
  float: left;
  width: 920px;
  margin: -40px 10px 0 0;
  text-align: justify;
}

.right {
  float: right;
  width: 440px;
  margin: -40px 0 0 0;  
}

.mensleft {
  float: left;
  width: 240px;
  margin: -40px 0 0 0;
  text-align: justify;
}

.mensright {
  float: right;
  width: 650px;
  margin: -40px 10px 0 0;
  text-align: justify;
}

.leftbottom {
  float: left;
  width: 440px;
  margin: 0 20px 0 0;
  text-align: justify;
}

.rightbottom {
  float: right;
  width: 440px;
  margin: 0 0 0 20px;  
}


#footer {
  width: 980px;
  height: 60px;
  margin: 0 auto;
  clear: both;
}

/* NAVIGATION */

#nav ul {
  float: right;
  margin: 30px 0 0 0;
  padding: 0;
  list-style: none;
}

#nav li {
  float: left;
  display: inline;
  font-size: 1.0em;
  color: #bbb;
  margin: 0 0 0 16px;
  padding: 0;
}

#nav li a {
  color: #111;
  text-decoration: none;
  padding: 7px 9px;
  background: #fff;
}

#nav li a:hover {
  color: #fff;
  text-decoration: none;
  background: #111;
}

#footer a {
  color: #999;
}

#footer a:hover {
  color: #111;
  text-decoration: underline;
}

#footer ul {
  float: left;
  margin: 0;
  padding: 0;
  list-style: none;
}

#footer li {
  float: left;
  display: inline;
  font-size: 0.9em;
  line-height: 60px;
  color: #999;
  margin: 0 16px 0 0;
  padding: 0;
}

#footer li a {
  color: #999;
  text-decoration: underline;
}

#footer li a:hover {
  color: #111;
  text-decoration: underline;
}

/*LOGIN */

#login {
  margin: 0 0 0 465px;
  padding: 10px 0 0 0;

}

#login a {
  color: #999;
}

#login a:hover {
  color: #111;
  text-decoration: underline;
}

#login ul {
  float: left;
  margin: 0;
  padding: 0;
  list-style: none;
}

#login li {
  float: left;
  display: inline;
  font-size: 0.9em;
  line-height: 16px;
  color: #999;
  margin: 0 16px 0 0;
  padding: 0;
}

#login li a {
  color: #999;
  text-decoration: underline;
}

#login li a:hover {
  color: #111;
  text-decoration: underline;
}

/* CHECKOUT */

#checkout {
  margin: 0 450px 0 0;
  padding: 0 0 10px 10px;

}

#checkout a {
  color: #999;
}

#checkout a:hover {
  color: #111;
  text-decoration: underline;
}

#checkout ul {
  float: right;
  margin: 0;
  padding: 0;
  list-style: none;
}

#checkout li {
  float: right;
  display: inline;
  font-size: 0.9em;
  line-height: 16px;
  color: #999;
  margin: 0 16px 0 0;
  padding: 0;
}

#checkout li a {
  color: #999;
  text-decoration: underline;
}

#checkout li a:hover {
  color: #111;
  text-decoration: underline;
}

/* TYPOGRAPHY */

#wrapper h1 {
  font-size: 2.8em;
  font-weight: normal;
  line-height: 1.1em;
  letter-spacing: -2px;
  color: #bbb;
  margin: 0;
  padding: 0;
}

#wrapper h1 a, #wrapper h3 a {
  color: #111;
  text-decoration: none;
}

#wrapper h1 a:hover, #wrapper h3 a:hover {
  color: #000;
  text-decoration: none;
}

#wrapper h3 {
  font-size: 1.8em;
  font-weight: normal;
  line-height: 1.0em;
  letter-spacing: -1px;
  color: #111;
  margin: 48px 0 18px 0;
  padding: 0 0 12px 0;
  border-bottom: 1px solid #e0e0e0;
}

#wrapper p {
  font-size: 1.0em;
  line-height: 1.5em;
  margin: 0 0 24px 0;
}

#main p a, #main li a {
  color: #111;
  text-decoration: underline;
}

#main p a:hover, #main li a:hover {
  color: #999;
  text-decoration: underline;
}

#main p a.btn {
  color: #fff;
  text-decoration: none;
  padding: 7px 9px;
  background: #111;
}

#main p a:hover.btn {
  color: #fff;
  text-decoration: none;
  padding: 7px 9px;
  background: #aaa;
}

#main ul {
  margin: 0 0 0 14px;
  padding: 0;
  list-style: square;
}

#main li {
  font-size: 1.0em;
  line-height: 1.5em;
  margin: 0;
  padding: 6px 0;
}

br.clearit {
  clear: both;
}

/* IMAGES */

.left img, .right img {
  margin: 0 0 20px 0;
  border: 0;
}

#logo img {
  border: 0;
}

#rightimg {
  float: right;

}
/* FORMS */

form,fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

label {
  display: block;
  font-family: arial,verdana,tahoma,helvetica,sans-serif;
  font-size: 1.0em;
  margin: 0 0 5px 0;
}

input.field, textarea.field {
  display: block;
  font-family: arial,verdana,tahoma,helvetica,sans-serif;
  font-size: 1.0em;
  color: #000;
  margin: 0 0 10px 0;
  padding: 7px;
  background: #f5f5f5;
  border: 1px solid #ddd;
}

input.field:focus, textarea.field:focus {
  color: #000;
  background: #fff;
  border: 1px solid #111;
}

input.button {
  font-size: 1.5em;
  color: #111;
  padding: 10px 15px;
}

.styled-select select {
   background: transparent;
   width: 259px;
   padding: 7px;
   margin: 0 0 10px 0;
   font-size: 16px;
   border: 1px solid #ccc;
   height: 34px;
}

#listimg {
    display: inline-block;
    margin: 5px 20px;
    padding: 5px;    
}

#imgcontainer{
    text-align:center;    
    border:1px solid #666;
}

/* Costume listings! */

.costumes1, .costumes2, .costumes3, .costumes4 {
    float: left;
    width: 90px;
    height: 100px;
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 180px;
}

/* Blog Links */

.links a:link, a:active, a:visited {

    color: #000

}

.links a:hover {

    color: #000;
    text-decoration: italic;
    background: #111;
}
 
Putting the login and and checkout divs inside the wrapper seems to help (if I got the right idea).
Alternatively, wrap them in a <header> tag (assuming you use HTML5) and apply the same styling to your header as your wrapper (e.g. same width/float/margins)
 
Back
Top Bottom