I have a nested div (see below) that have different CSS classes to give the background color for the container and format for the text
<div class="section"> <div class="sectionTitle"> <dx:ASPxLabel ID="lblSectionTitle" runat="server" Text='<%# Eval("SectionTitle") %>'></dx:ASPxLabel> </div> <div class="sectionTitle"> <dx:ASPxLabel ID="lblSectionDesc" runat="server" Text='<%# Eval("SectionDescription") %>'></dx:ASPxLabel> </div>
There is a private tag for the div section, there is more content that displays correctly.
CSS for above:
.section { padding: 5px; background-color: #ffffff; } .sectionTitle { font-size: 11px; font-family: Arial; font-weight: bold; color: #546fb2; }
When I comment on the background color in the .s section, sectionTitle formatting is applied, but when I put the background color in it, it overwrites the color of the sectionTitle. I tried setting the .section color to match the .sectionTitle, but this still does not work.
It works fine in every browser (not compatible with IE9, Firefox, Chrome), and I have been looking at it for a couple of hours, which is a little frustrating because I can not determine the problem.
The content is on an ASP.NET page that uses MasterPage, which has a doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Can someone help shed some light on this, please?
Thanks in advance
Andy
source share