could not change background color of the "content" div.

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
hi all,

I am new to web designing.

here is my css.
---------------------------------------------------------------------
height : 300px;
/* add background image */
background-image : URL(images/grroop-top-island.jpg);
/* display background only once */
background-repeat : no-repeat;
/* center heading division on page */
margin-left: auto;
margin-right: auto;
}


/* define size of main division and center on page */
#main {
width: 900px;
height: 500px;
/* center division on page */
margin-left: auto;
margin-right: auto;
}


/* define size of left division, center links, locate and add color */
#left {
width: 222px;
height: 500px;
/* center link buttons */
text-align: center;
/* send this div to first available (left) location within main div */
float: left;
/* set back color of this division */
background-color: #FF8040;
/* set left margin
//margin-left: 50;
}

/* define size of content division, locate and control overflow */
#content {
width: 900px;
height: 500px;
/* set back color to white */
background-color: #FFFFFF;
/* send this div to next available location (left) within main div */
float: left;
/* initiate scroll bars if too much content is added */
overflow: auto
}
---------------------------------------------------------------------

and here is HTML

---------------------------------------------------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<HTML>
<HEAD>
<link rel="stylesheet" href="mystyle.css"
type="text/css">
</head>

<body>

<div id="center-page">
<div id="heading">
</div>

<div id="main">
<div id="left">
"left1"<br>
"left2"<br>
"left3"<br>
"left4"<br>
"left5"<br>
</div>

<div id="content">
"content1"<br>
"content2"<br>
"content3"<br>
"content4"<br>
"content5"<br>
</div>
</div>
<div id="footer">
</div>

</body>
</html>
--------------------------------------------------

Couldn't able to change the background color of content div.

whats wrong?

Regards

MN
 
try it locally to be sure

like :

Code:
<div style="background: red;">

try to use class="divcontent"

like :
Code:
<style>
.divcontent { background: red; }
</style>


<div class="divcontent"></div>
 
Back
Top