My div background color did not show up when I placed it in the external CSS sheet. I went ahead and made it an inline style and got my desired result except for thebig space between the right side of the picture and the edge of the containing div. Why is that? I was trying to stay away fro tables which immediately gave me the result I have now.

@charset "utf-8";
/* CSS Document */

body{
background:#edba19;
background-repeat:repeat-x;
background-image:url(background.jpg);
background-position: top;
}

div #container{
	font-family:Arial, Helvetica, sans-serif;
	font-size:10px;
	background-color:#843382;
	text-align: justify;
	margin-left: 40px;
	color: #FFFFFF;
	
}
div #name{
	padding-left:30px;
}
div #logo{
	padding-left: 20px;
	float: left;
	padding-right: 20px;
}
div #headpic{
	padding-bottom: 3px;
}

a:active,a:link{
color: #FFFFFF; 
text-decoration: underline;
}
a:hover {
text-decoration: underline; color:#FFFFFF}

a img {border:0px; }


#header {


}

please also post the HTML code as in above code you have lot of divs

I actually solved my problem. I forgot that floating divs need to have a set width for another div to be by its side.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.