Jump to content

background image and color


lillizzierae

Recommended Posts

hi. what i'm doing on my site is having a background image centered inside the container div and have a black background to fill in the surrounding white space that the background image doesn't fill. does that make sense? i've done it before but for some reason it's just going over my head. i have a container with three divs inside of it (which the id's are: header, body and footer). everything is external css.

Link to comment
Share on other sites

sure no problem. hopefully this works cause i've never stuck code into a forum. so if it doesn't work tell me how to do it. :)

css {	font-family: "Times New Roman", Times, serif;	font-size: 12px;	color: #FFFFFF;	background-color: #000000;	background-repeat: no-repeat;	background-position: center top;	margin: 0px;	height: 1000px;	width: 800px;}#header {	position:absolute;	left:175px;	top:539px}#body {	position:absolute;	left:147px;	top:677px;	text-align: left;	float: left;	height: 130px;	width: 650px;}#left_content {	background-color: #000000;	/*background-image: url(images/blackback.gif);*/	text-align: left;	float: left;	height: 130px;	width: 300px;	padding: 10px;	border-color: #000000;	border: 2px solid;}#right_content {	text-align: left;	float: right;	height: 200px;	width: 246px;	padding: 10px;	border-color: #000000;	border: 2px dotted;}#footer {	margin-top: 10px;	margin-bottom: 10px;	position:absolute;	left:78px;	top:987px}#container {	font-family: "Times New Roman", Times, serif;	font-size: 14px;	margin-right: 70px;	margin-left: 60px;	padding: 3px;	background-repeat: no-repeat;	background-position: center top;	background-image: url(images/nichols_back.png);	height: 1000px;	width: 800px;	background-color: #000000;}

Link to comment
Share on other sites

I'm not sure which part you want to have the image and black background but here's the code.#someid {background: url('images/someimage.jpg') no-repeat center #000000;}not exactly 100% sure about the center if it'll center it in the middle of you're div if not maybe add middle after center.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...