D
dee
I'm really not sure if anyone can help me - I know this is a FrontPage
newsgroup, not a CSS one! However, here goes:
I'm new to CSS and am struggling with my first design. I'm so tempted to go
back to tables but am trying not to!
I have posted my HTML and CSS below. Very simply, I would like 3 columns
that should look like (in order from top of page):
A "banner image" that goes across the entire page - 100%.
A container that is 65% the width of the page, that houses:
-A header that is currently in three divs, but could be in one, if I could
figure out how.
-A horizontal ul navigation bar.
-Three columns, the middle being for the main content.
A footer that spans the main content (65%)
I have copied and pasted from here and there (very generously explained and
offered), but am missing something.
Here is my HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en-ca">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>My Page</title>
<link rel="stylesheet" type="text/css" href="djh_styles_sheet.css">
</head>
<body>
<div id="banner">
<img src="djh_banner.jpg" width="100%" height="100"
alt="Welcome"
</div>
<div id="wrapper1"><!-- sets background to white and creates full length
leftcol-->
<div id="wrapper2"><!-- sets background to white and creates full length
rightcol-->
<div id="maincol"><!-- begin main content area -->
<div id="leftcol"><!-- begin leftcol -->
<p> <img src="djh_logo.jpg" width="150" height="100"</p>
</div><!-- end leftcol -->
<div id="rightcol"><!-- begin rightcol -->
<p><img src="people.jpg" width="275" height="150"</p>
</div><!-- end righttcol -->
<div id="centercol"><!-- begin centercol -->
<h1><p> </p>
<p>Build Your People...</p>
<p>    Build Your Business.</p></h1>
</div><!-- end centercol -->
<p class="clear"></p>
<div id="nav_bar"><!-- begin nav_bar -->
<ul>
<li><a href=#"index.htm">Home  </a</li>
<li><a href="#about_us.htm">About Us  </a</li>
<li><a href="#services.htm">Services  </a</li>
<li><a href="#">Training  </a</li>
<li><a href="#contact_us.htm">Contact Us  </a</li>
<li><a href="#links.htm">Links  </a</li>
<li><a href="#">Library  </a</li>
<li><a href="#testimonials.htm">Testimonials  </a</li>
<li><a href="#find_us.htm">Find Us  </a</li>
<li><a href="#employment.htm">Employment  </a</li>
</ul>
</p>
</div><!-- end nav_bar -->
<div id="maincol2"><!-- begin second main content area -->
<div id="leftcol2"><!-- begin leftcol -->
<p> sfsdfsdfsdfskdfklsd jflsdlf sdklf jsdf</p>
</div><!-- end leftcol -->
<div id="rightcol2"><!-- begin rightcol -->
<p>ksdlfslf jlskdf jklsdj fl dlsfj dsf</p>
</div><!-- end righttcol -->
<div id="centercol2"><!-- begin centercol -->
<p>dsfldsklf jf sdklf jlf dlf jdfjl fl</p>
</div><!-- end centercol -->
<!-- end main content area -->
</div><!-- end wrapper1 -->
</div><!-- end wrapper2 -->
</body>
</html>
Here is my CSS:
/* Make sure to use background-color: xxx and color: xxx in background rule,
because different browsers use different rules */
/* The following has the html for older browers like Opera */
html, body {margin: 0; padding: 0; font-family: verdana, geneva, arial,
helvetica, sans-serif; margin-top: 0; margin-bottom: 0.5em;
background-color: #AE2623; color: #AE2623; text-align: center}
h1 {font-family: trebuchet ms, verdana, geneva, arial,
helvetica, sans-serif; font-size: 110%; color: #841518; font-weight: bold;
margin-bottom: .1em; }
p {font-family: trebuchet ms, verdana, geneva, arial,
helvetica, sans-serif; font-size: 85%; color: #000000; margin-top: 0;
margin-bottom: 0.5em }
..clear {clear: both;}
#wrapper1 {
position:relative;
text-align:left;
width:65%;
background:#FFF url("../images/rightcolor_bg.gif") repeat-y top right;
}
#wrapper2 {
position:relative;
text-align:left;
width:100%;
}
#wrapper3 {
position:relative;
text-align:left;
width:100%;
background:#FFF url("../images/rightcolor_bg.gif") repeat-y top right;
}
#wrapper4 {
position:relative;
text-align:left;
width:100%;
background:url("../images/leftcolor_bg.gif") repeat-y top left;
}
#header {
position: relative
background:#BB62AB;
padding:10px;
width: 100%
margin:0;
align: center
float:center;
color:#FFF;
}
#header h1 {
font-size:200%;
}
#header a:hover {
color:#7A2875;
}
#nav_bar {position: relative; margin: 0 auto; ;/* align for good browsers */
text-align: left; /* counter the body center */
; column-span: 3; font-family: verdana, geneva, arial, helvetica,
sans-serif; font-size: 75%; text-decoration: none; width: 100%; }
#nav_bar ul {list-style: none; margin-right: 1em; padding: 0.2em 0.6em 0.2em
0.6em; padding-top: 1em; white-space: nowrap;}
#nav_bar li {display: inline;}
#nav_bar li a:link, #nav_bar li a:visited {font-size 70%; display: inline;
padding: 0.4em 0.1em 0.4em 0.5em;
width:117px;white-space:normal;text-align:center;
border-left: 4px solid #efb22D; border right: 1px dash #efb22D;
background-color: #cc0000; color: #ffffff; text-decoration: none;
margin-right: .1em; width: 75px}
#maincol {
position:relative;
margin:0;
padding:10px;
}
#maincol2 {
position:relative;
margin:0;
padding:10px;
}
#leftcol {
position:relative;
top:10px;
left:-10px;
float:left;
width:150px; /* for IE5/WIN */
voice-family: "\"}\"";
voice-family:inherit;
width:130px; /* actual value */
margin:0 0 -10px 0;
padding-left:0px;
background:#FFFFFF;
z-index:100;
}
#leftcol2 {
position:relative;
top:10px;
left:-10px;
float:left;
width:150px; /* for IE5/WIN */
voice-family: "\"}\"";
voice-family:inherit;
width:130px; /* actual value */
margin:0 0 -10px 0;
padding:0px;
background:#FFFFFF;
z-index:100;
}
#rightcol {
position:relative;
top:-10px;
right:-10px;
float:right;
width:300px; /* for IE5/WIN */
voice-family: "\"}\"";
voice-family:inherit;
width:280px; /* actual value */
margin:0 0 -10px 0;
padding:0px;
background:#FFFFFF;
z-index:99;
}
#rightcol2 {
position:relative;
top:-10px;
right:-10px;
float:right;
width:300px; /* for IE5/WIN */
voice-family: "\"}\"";
voice-family:inherit;
width:280px; /* actual value */
margin:0 0 -10px 0;
padding:0px;
background:#FFFFFF;
z-index:99;
}
#centercol {
position:relative;
right:-10px;
float:left;
margin:0 0 -10px 0;
padding:10px;
background:#FFFFFF;
z-index:99;
}
#centercol p {
font-family: verdana, geneva, arial, helvetica, sans-serif; font-size:
120%; color: #CC0000; font-weight: bold; margin-bottom: 0; text-align: left;
padding-left: 200px;
}
#centercol2 {
position:relative;
right:-10px;
float:left;
margin:0 0 -10px 0;
padding:0px;
background:#FFFFFF;
z-index:99;
}
#centercol2 a {
color:#666;
}
#centercol2 a:hover {
border-bottom:1px solid;
color:#9343B9;
}
#footer {
position:relative;
top:1px;
background:#7A2875;
width:100%;
clear:both;
margin:0;
padding:1% 0;
text-align:center;
color:#CCC;
}
Any help would be greatly appreciated!
newsgroup, not a CSS one! However, here goes:
I'm new to CSS and am struggling with my first design. I'm so tempted to go
back to tables but am trying not to!
I have posted my HTML and CSS below. Very simply, I would like 3 columns
that should look like (in order from top of page):
A "banner image" that goes across the entire page - 100%.
A container that is 65% the width of the page, that houses:
-A header that is currently in three divs, but could be in one, if I could
figure out how.
-A horizontal ul navigation bar.
-Three columns, the middle being for the main content.
A footer that spans the main content (65%)
I have copied and pasted from here and there (very generously explained and
offered), but am missing something.
Here is my HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Language" content="en-ca">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>My Page</title>
<link rel="stylesheet" type="text/css" href="djh_styles_sheet.css">
</head>
<body>
<div id="banner">
<img src="djh_banner.jpg" width="100%" height="100"
alt="Welcome"
</div>
<div id="wrapper1"><!-- sets background to white and creates full length
leftcol-->
<div id="wrapper2"><!-- sets background to white and creates full length
rightcol-->
<div id="maincol"><!-- begin main content area -->
<div id="leftcol"><!-- begin leftcol -->
<p> <img src="djh_logo.jpg" width="150" height="100"</p>
</div><!-- end leftcol -->
<div id="rightcol"><!-- begin rightcol -->
<p><img src="people.jpg" width="275" height="150"</p>
</div><!-- end righttcol -->
<div id="centercol"><!-- begin centercol -->
<h1><p> </p>
<p>Build Your People...</p>
<p>    Build Your Business.</p></h1>
</div><!-- end centercol -->
<p class="clear"></p>
<div id="nav_bar"><!-- begin nav_bar -->
<ul>
<li><a href=#"index.htm">Home  </a</li>
<li><a href="#about_us.htm">About Us  </a</li>
<li><a href="#services.htm">Services  </a</li>
<li><a href="#">Training  </a</li>
<li><a href="#contact_us.htm">Contact Us  </a</li>
<li><a href="#links.htm">Links  </a</li>
<li><a href="#">Library  </a</li>
<li><a href="#testimonials.htm">Testimonials  </a</li>
<li><a href="#find_us.htm">Find Us  </a</li>
<li><a href="#employment.htm">Employment  </a</li>
</ul>
</p>
</div><!-- end nav_bar -->
<div id="maincol2"><!-- begin second main content area -->
<div id="leftcol2"><!-- begin leftcol -->
<p> sfsdfsdfsdfskdfklsd jflsdlf sdklf jsdf</p>
</div><!-- end leftcol -->
<div id="rightcol2"><!-- begin rightcol -->
<p>ksdlfslf jlskdf jklsdj fl dlsfj dsf</p>
</div><!-- end righttcol -->
<div id="centercol2"><!-- begin centercol -->
<p>dsfldsklf jf sdklf jlf dlf jdfjl fl</p>
</div><!-- end centercol -->
<!-- end main content area -->
</div><!-- end wrapper1 -->
</div><!-- end wrapper2 -->
</body>
</html>
Here is my CSS:
/* Make sure to use background-color: xxx and color: xxx in background rule,
because different browsers use different rules */
/* The following has the html for older browers like Opera */
html, body {margin: 0; padding: 0; font-family: verdana, geneva, arial,
helvetica, sans-serif; margin-top: 0; margin-bottom: 0.5em;
background-color: #AE2623; color: #AE2623; text-align: center}
h1 {font-family: trebuchet ms, verdana, geneva, arial,
helvetica, sans-serif; font-size: 110%; color: #841518; font-weight: bold;
margin-bottom: .1em; }
p {font-family: trebuchet ms, verdana, geneva, arial,
helvetica, sans-serif; font-size: 85%; color: #000000; margin-top: 0;
margin-bottom: 0.5em }
..clear {clear: both;}
#wrapper1 {
position:relative;
text-align:left;
width:65%;
background:#FFF url("../images/rightcolor_bg.gif") repeat-y top right;
}
#wrapper2 {
position:relative;
text-align:left;
width:100%;
}
#wrapper3 {
position:relative;
text-align:left;
width:100%;
background:#FFF url("../images/rightcolor_bg.gif") repeat-y top right;
}
#wrapper4 {
position:relative;
text-align:left;
width:100%;
background:url("../images/leftcolor_bg.gif") repeat-y top left;
}
#header {
position: relative
background:#BB62AB;
padding:10px;
width: 100%
margin:0;
align: center
float:center;
color:#FFF;
}
#header h1 {
font-size:200%;
}
#header a:hover {
color:#7A2875;
}
#nav_bar {position: relative; margin: 0 auto; ;/* align for good browsers */
text-align: left; /* counter the body center */
; column-span: 3; font-family: verdana, geneva, arial, helvetica,
sans-serif; font-size: 75%; text-decoration: none; width: 100%; }
#nav_bar ul {list-style: none; margin-right: 1em; padding: 0.2em 0.6em 0.2em
0.6em; padding-top: 1em; white-space: nowrap;}
#nav_bar li {display: inline;}
#nav_bar li a:link, #nav_bar li a:visited {font-size 70%; display: inline;
padding: 0.4em 0.1em 0.4em 0.5em;
width:117px;white-space:normal;text-align:center;
border-left: 4px solid #efb22D; border right: 1px dash #efb22D;
background-color: #cc0000; color: #ffffff; text-decoration: none;
margin-right: .1em; width: 75px}
#maincol {
position:relative;
margin:0;
padding:10px;
}
#maincol2 {
position:relative;
margin:0;
padding:10px;
}
#leftcol {
position:relative;
top:10px;
left:-10px;
float:left;
width:150px; /* for IE5/WIN */
voice-family: "\"}\"";
voice-family:inherit;
width:130px; /* actual value */
margin:0 0 -10px 0;
padding-left:0px;
background:#FFFFFF;
z-index:100;
}
#leftcol2 {
position:relative;
top:10px;
left:-10px;
float:left;
width:150px; /* for IE5/WIN */
voice-family: "\"}\"";
voice-family:inherit;
width:130px; /* actual value */
margin:0 0 -10px 0;
padding:0px;
background:#FFFFFF;
z-index:100;
}
#rightcol {
position:relative;
top:-10px;
right:-10px;
float:right;
width:300px; /* for IE5/WIN */
voice-family: "\"}\"";
voice-family:inherit;
width:280px; /* actual value */
margin:0 0 -10px 0;
padding:0px;
background:#FFFFFF;
z-index:99;
}
#rightcol2 {
position:relative;
top:-10px;
right:-10px;
float:right;
width:300px; /* for IE5/WIN */
voice-family: "\"}\"";
voice-family:inherit;
width:280px; /* actual value */
margin:0 0 -10px 0;
padding:0px;
background:#FFFFFF;
z-index:99;
}
#centercol {
position:relative;
right:-10px;
float:left;
margin:0 0 -10px 0;
padding:10px;
background:#FFFFFF;
z-index:99;
}
#centercol p {
font-family: verdana, geneva, arial, helvetica, sans-serif; font-size:
120%; color: #CC0000; font-weight: bold; margin-bottom: 0; text-align: left;
padding-left: 200px;
}
#centercol2 {
position:relative;
right:-10px;
float:left;
margin:0 0 -10px 0;
padding:0px;
background:#FFFFFF;
z-index:99;
}
#centercol2 a {
color:#666;
}
#centercol2 a:hover {
border-bottom:1px solid;
color:#9343B9;
}
#footer {
position:relative;
top:1px;
background:#7A2875;
width:100%;
clear:both;
margin:0;
padding:1% 0;
text-align:center;
color:#CCC;
}
Any help would be greatly appreciated!