Jump to content

Div Bgcolor Not Displaying


alexpnd
 Share

Recommended Posts

Hi fellows. This problem keeps reoccuring and Im hoping some of you have run into this before. I would place a Div container and set its background, but it would not display. Lets say I put <div class="container"> <b>Subtitle here</b></div> and container had a background color, it will not display. I have no idea what im doing wrong. Thanks for your time.

Link to comment
Share on other sites

Hi fellows. This problem keeps reoccuring and Im hoping some of you have run into this before. I would place a Div container and set its background, but it would not display. Lets say I put <div class="container"> <b>Subtitle here</b></div> and container had a background color, it will not display. I have no idea what im doing wrong. Thanks for your time.
What does the CSS statement look like where you define the background color? You used 'bgcolor' in your thread subject line, but the property is called background-color...just on the offchance it's that simple.
Link to comment
Share on other sites

What does the CSS statement look like where you define the background color? You used 'bgcolor' in your thread subject line, but the property is called background-color...just on the offchance it's that simple.
No its not I have the correct syntax. I don't blame your assumption. It seems like another style is over riding the background. Even the background image im trying to implement now. I have a few layers of container div's, perhaps 2 containers down I have a div that refuses to display background image or background color. It's immediate parent has a background image that displays just fine. I was hoping someone had run into this problem without me being too specific. If you need the css ill be more than happy to paste though a bit embarrassed of its crudity. Thanks.
Link to comment
Share on other sites

A link to the site with a comment about which div is in error would be good.Or post the css and html here. Either way, but a link would be best.
I would link but its not up yet. The div id="content" is not displaying its background image. I have double checked the file name and location, it is there. CSS FILE:
body{margin:0;padding:0;line-height: 1em;background-color:#424539}b{font-size: 120%;}p.{color:#32456B}p.caption {color:black; font-size:small;}#pricewind {width:360px;margin:0 auto;padding:10px;}#pricetable {width:300px; margin:0 auto;}#titlediv {width:100%; text-align:center;}#titleimg {border:0px}h3 { color:#ffbb50; margin:0; margin-bottom:10px; }img {margin:0}#close {float:right; color:#bbbbbb; font-size:60%}#content {width:80%;text-align:center; margin-left:20px; margin-right:20px; background-image:url('images\pricetable.png'); background-repeat:repeat-y;}#row {width:100%; }#within {color:#dddddd; font-size:70%;float:left}#price {color:red; font-size:70%}

HTML:

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Rates & Pricing</title><link rel="stylesheet" type="text/css" href="pricestyle.css" /></head><body><div id="pricewind"><a id="close" href="java script:window.close();">Close</a><div id="titlediv"> <img src="images\ratesandpricing.png" id="titleimg"> </div><br><h3>Editing</h3><div id="content"><div id="row"> <div id="within">Within 4 days (96 hours)</div> <div id="price">$8.00 per page</div></div><div id="row"> <div id="within">Within 2 days (48 hours)</div> <div id="price">$10.00 per page</div></div></div><img src="images\pricingbar.png"><br><h3>Personal Statement</h3><div id="content"><div id="row"> <div id="within">Within 4 days (96 hours)</div> <div id="price">$80.00 first page</div><div id="price">$25 per additional page</div></div><br><div id="row"> <div id="within">Within 2 days (48 hours)</div> <div id="price">$100.00 first page</div><div id="price">$30 per additional page</div></div></div><img src="images\pricingbar.png"><br><h3>Proofreading</h3><div id="content"><div id="row"> <div id="within">Within 4 days (96 hours)</div> <div id="price">$5.00 per page</div></div><div id="row"> <div id="within">Within 2 days (48 hours)</div> <div id="price">$6.00 per page</div></div></div><img src="images\pricingbar.png"><br><h3>Tutoring</h3><div id="content"><div id="within">Please contact us</div></div><br></div></body></html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...