Avatar of EmeraldIsleNC
Flag for United States of America

asked on 

Dreamweaver CS3 - Different styles for header and body links?

I'm creating a new site that uses Dreamweaver templates in which the following is achieved:

Header (header) region:
background - black
link color - white

Body (mainContent) region:
background - white
link color - purple (#5c38b0)

I'm having trouble achieving this. I've tried the code below, but the links in my pages are showing up as default browser link colors (blue for "a", purple for "visited", etc.).

What am I doing wrong?

I'm very much a novice at CSS, but I'm trying to sort it out. Any help is appreciated.


body {
	font: 100% Verdana, Arial, Helvetica, sans-serif;
	background: #eeeeee;
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
	color: #000000;
.oneColFixCtrHdr #container {
	width: 750px;  /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
	background: #FFFFFF;
	margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
	border: 1px solid #000000;
	text-align: left; /* this overrides the text-align: center on the body element. */
.oneColFixCtrHdr #header {
	background: #000000;
	padding: 0 0px 0 0px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
#header a {
      text-decoration: none;
.oneColFixCtrHdr #header h1 {
	margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
	padding: 0px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
.oneColFixCtrHdr #mainContent {
	padding: 0 0px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
	background: #FFFFFF;
#mainContent a {
      text-decoration: underline;
.oneColFixCtrHdr #footer {
	padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
.oneColFixCtrHdr #footer p {
	margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
	padding: 7px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
.style1 {
	color: #FFFFFF;
	font-family: Arial, Helvetica, sans-serif;
	font-size: large;
	font-style: italic;
.style2 {
	color: #FFFFFF;
	font-family: Arial, Helvetica, sans-serif;
	font-size: x-small;
.style3 {
	color: #FFFFFF;
	font-size: small;

Open in new window

CSSAdobe Dreamweaver

Avatar of undefined
Last Comment

8/22/2022 - Mon