/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] can’t assign bgcolor to child divs

Hello.

I’m trying to lay a background color on a div but I’m unable to. I don’t know why is not doing it or if I’m doing something wrong. I’m fairly new to CSS but, can’t understand why the bgcolor is not inhereted by the child divs

I would like to know why I’m not getting a background color on customer_profile div.

Now, if I wrap customer_profile with another div for example:

#customer_bg{
background-color: #d5e6ff;

}

then it works but, I’m not getting the desired results.

Any suggestions??
Thanks in advanced for your help.

[code=html]
#customer_profile{
width: 100%
background-color: #d5e6ff;
margin-top: 10px;
border: 1px #000 solid;
padding-top: 5px;
padding-bottom: 5px;
}

#customer_info {
font-size: 12px;
}
#customer_info td{
padding-bottom: 10px;
}

#other_cust_info{
float: left;
margin-left: 0px;
width: 410px;
padding-left: 10px;

}
#other_cust_info2{
float: left;
margin-left: 15px;
width: 410px;
padding-left: 10px;

}
<div id=”customer_profile”>

<div id=”other_cust_info”>
<table id=”customer_info”>
<tr><td class=”label”>Mensualidad</td><td>:</td><td><?=$fee[‘m_desc’]?>&nbsp;&nbsp;$&nbsp;<?=number_format( $fee[‘m_amount’],2,’.’,’,’)?></td></tr>
</table>
</div>

<div id=”other_cust_info2″>
<table id=”customer_info”>
<tr><td class=”label”>Fecha de registro</td><td>:</td><td><?=$c[‘customer_date’]?></td></tr>
</table>
</div>
<div id=”clear_left”></div>
</div>

[/code]

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@jelly5131Aug 27.2010 — You're missing a semicolon after width:100% in the #customer_profile styles.
Copy linkTweet thisAlerts:
@landysaccountauthorAug 28.2010 — Looks like that was it.
×

Success!

Help @landysaccount spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...