mikewebb
11-23-2006, 06:30 PM
Hi there. I am very new to website designing. A friend and I are building a small website selling CDs. We are using CSS/HTML. The problem I am having is when a page has a lot of content it looks fine but when it only has a small amount of content then the page collapses and quite frankly looks stupid. I have read some tutorials on columns/faux columns etc. but am getting very lost and confused to the point that I can't see where I might be going wrong.
The site is two columns with left hand navigation.
The CSS I am using is:
/* --------- 1. defaults --------- */
{ margin: 0; padding: 0; }
body { color: #000000; font: 11px/14px Verdana, Arial, sans-serif; padding-bottom: 50px; background-color: #BAC5BA }
/* --------- 2. structure --------- */
#wrapper { width: 759px; margin: 0 auto; border-right: 1px solid #000000; border-left: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000; } #masthead { margin-bottom: 17px; background-color: #6A7872 height: 173px; voice-family: "\"}\""; voice-family:inherit; height: 163px; }
pullNav { float: right; margin-top: 20px; margin-right: 10px; }
#navigation { width: 127px; float: left; margin-right: 20px; background-color: #93A49A } #content { width: 601px; float: left; } .column { width: 187px; float: left; padding-bottom: 20px; margin-right: 20px; }
# .noRightMargin { margin-right: 0; }
#footer { clear: both; }
.separator { clear: both; height: 4px; background-color: #4f615f; margin-bottom: 13px; } .separatorInvisible { clear: both; height: 1px; }
/* ---------- 3. links and navigation ---------- */
a { color: #000000; }
a:hover { color: #0a189d; }
#navigation a { text-decoration: none; color: #ffffff; padding-left: 10px; display: block; width: 127px; voice-family: "\"}\""; voice-family:inherit; width: 117px; }
#navigation a:hover { background-color: #93A49A; }
#navigation ul { list-style-type: none; background: #000000; border-top: 1px solid #4f615f; border-right: 1px solid #4f615f; border-left: 1px solid #4f615f; font: bold 11px Arial, sans-serif; }
#navigation li { border-bottom: 1px solid #4f615f; text-transform: uppercase; line-height: 17px; }
#pullNav ul { list-style-type: none; background: #000000; border-top: 1px solid #4f615f; border-right: 1px solid #4f615f; border-left: 1px solid #4f615f; font: bold 11px Arial, sans-serif; }
#pullNav li { border-bottom: 1px solid #4f615f; text-transform: uppercase; line-height: 17px; }
#pullNav a { text-decoration: none; color: #ffffff; padding-left: 10px; display: block; width: 127px; voice-family: "\"}\""; voice-family:inherit; width: 117px; }
#pullNav a:hover { background-color: #93A49A; }
/* ---------- 4. fonts ---------- */
h1, h2, h3, h4, p, ul { } #content h1 { font-size: 18px; text-transform: uppercase; margin-bottom: 12px; background: none; padding-left: 10px; font-family: Arial, sans-serif; } #navigation h1 { color: #000000; font: bold 11px Arial, sans-serif; text-transform: uppercase; }
#content .column h1 { font-family: Verdana, Arial, sans-serif; font-weight: bold; font-size: 14px; line-height: 16px; margin-bottom: 2px; background: none; text-transform: none; padding-left: 0; }
h2 { color: #000000; font: bold 11px Arial, sans-serif; text-transform: uppercase; }
.column h2 { } h3 { } h4 { } p { margin-bottom: 1em; }
.introEnlargedText { font-weight: bold; font-size: 14px; color: #000000; }
#footer p { font-size: 10px; }
/* -- list styles -- */
ul { list-style-type: none; }
.ourPrice { font-weight: bold; color: #000000; }
/* ---------- 5. images ---------- */
a img { border: 0; }
.column a img { border: 10px solid #e1e1e1; margin-bottom: 10px; }
/* ---------- 6. hacks ---------- *
/ body { /* IE 5 centring bug fix */ text-align: center; }
#wrapper { text-align: left; }
#content h1, #pullNav li, #navigation h1, h2 { text-transform: uppercase; }
If anybody could point out what I do to make the page expand I would be very grateful.
The site is two columns with left hand navigation.
The CSS I am using is:
/* --------- 1. defaults --------- */
{ margin: 0; padding: 0; }
body { color: #000000; font: 11px/14px Verdana, Arial, sans-serif; padding-bottom: 50px; background-color: #BAC5BA }
/* --------- 2. structure --------- */
#wrapper { width: 759px; margin: 0 auto; border-right: 1px solid #000000; border-left: 1px solid #000000; border-top: 1px solid #000000; border-bottom: 1px solid #000000; } #masthead { margin-bottom: 17px; background-color: #6A7872 height: 173px; voice-family: "\"}\""; voice-family:inherit; height: 163px; }
pullNav { float: right; margin-top: 20px; margin-right: 10px; }
#navigation { width: 127px; float: left; margin-right: 20px; background-color: #93A49A } #content { width: 601px; float: left; } .column { width: 187px; float: left; padding-bottom: 20px; margin-right: 20px; }
# .noRightMargin { margin-right: 0; }
#footer { clear: both; }
.separator { clear: both; height: 4px; background-color: #4f615f; margin-bottom: 13px; } .separatorInvisible { clear: both; height: 1px; }
/* ---------- 3. links and navigation ---------- */
a { color: #000000; }
a:hover { color: #0a189d; }
#navigation a { text-decoration: none; color: #ffffff; padding-left: 10px; display: block; width: 127px; voice-family: "\"}\""; voice-family:inherit; width: 117px; }
#navigation a:hover { background-color: #93A49A; }
#navigation ul { list-style-type: none; background: #000000; border-top: 1px solid #4f615f; border-right: 1px solid #4f615f; border-left: 1px solid #4f615f; font: bold 11px Arial, sans-serif; }
#navigation li { border-bottom: 1px solid #4f615f; text-transform: uppercase; line-height: 17px; }
#pullNav ul { list-style-type: none; background: #000000; border-top: 1px solid #4f615f; border-right: 1px solid #4f615f; border-left: 1px solid #4f615f; font: bold 11px Arial, sans-serif; }
#pullNav li { border-bottom: 1px solid #4f615f; text-transform: uppercase; line-height: 17px; }
#pullNav a { text-decoration: none; color: #ffffff; padding-left: 10px; display: block; width: 127px; voice-family: "\"}\""; voice-family:inherit; width: 117px; }
#pullNav a:hover { background-color: #93A49A; }
/* ---------- 4. fonts ---------- */
h1, h2, h3, h4, p, ul { } #content h1 { font-size: 18px; text-transform: uppercase; margin-bottom: 12px; background: none; padding-left: 10px; font-family: Arial, sans-serif; } #navigation h1 { color: #000000; font: bold 11px Arial, sans-serif; text-transform: uppercase; }
#content .column h1 { font-family: Verdana, Arial, sans-serif; font-weight: bold; font-size: 14px; line-height: 16px; margin-bottom: 2px; background: none; text-transform: none; padding-left: 0; }
h2 { color: #000000; font: bold 11px Arial, sans-serif; text-transform: uppercase; }
.column h2 { } h3 { } h4 { } p { margin-bottom: 1em; }
.introEnlargedText { font-weight: bold; font-size: 14px; color: #000000; }
#footer p { font-size: 10px; }
/* -- list styles -- */
ul { list-style-type: none; }
.ourPrice { font-weight: bold; color: #000000; }
/* ---------- 5. images ---------- */
a img { border: 0; }
.column a img { border: 10px solid #e1e1e1; margin-bottom: 10px; }
/* ---------- 6. hacks ---------- *
/ body { /* IE 5 centring bug fix */ text-align: center; }
#wrapper { text-align: left; }
#content h1, #pullNav li, #navigation h1, h2 { text-transform: uppercase; }
If anybody could point out what I do to make the page expand I would be very grateful.