Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7653325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:00:18+00:00 2026-05-31T12:00:18+00:00

I have a nested div (see below) which have different CSS classes to give

  • 0

I have a nested div (see below) which have different CSS classes to give a background color for the container and a 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 closing tag for the section div, there’s more content in there which is rendering correctly.

The CSS for the above is:

.section
{
    padding: 5px; 
    background-color: #ffffff; 
}

.sectionTitle
{
    font-size: 11px; 
    font-family: Arial; 
    font-weight: bold;
    color: #546fb2;
}

When I comment out the background color in .section the formatting of sectionTitle is being applied but when I put the background-color in there it overwrites the color of the sectionTitle. I have tried setting the color of .section to match .sectionTitle but this still doesn’t work.

In every browser (IE9 non-compatibility, Firefox, Chrome) it works fine and I’ve been looking at this for a couple of hours now which is getting slightly frustrating as I can’t spot the issue.

The content is on a ASP.NET page which uses a MasterPage which has the doctype:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Can anyone help shed some light on this please?

Thanks in advance

Andy

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:00:20+00:00Added an answer on May 31, 2026 at 12:00 pm

    Internet Explorer has a compatibility “feature” where it always renders sites that are on the local network in compatibility mode. You have to explicitly turn this off in one of two ways.

    <meta http-equiv="x-ua-compatible" content="ie=edge" /> 
    

    This edge marker tells ie to always render in it’s most standard mode it supports.

    The other method (which I prefer) is used if you are using a server side technology like asp.net or php, which is to add an http header (in asp.net this goes in global.asax, also the chrome=1 enables chromeframe if installed):

    protected void Application_BeginRequest() 
    { 
        Response.Headers.Add("X-UA-Compatible", "IE=edge, Chrome=1"); 
    } 
    

    EDIT:

    There is also a third way, and that’s to disable it in the compatibility view tab in Internet Options. This only affects your computer, however.

    Also, it’s better t use the header method if at all possible, rather than the meta tag method. By the time the browser has read the metatag, it’s already in it’s primary mode. The meta tag only affects the document rendering mode, rather than the browser compatibiltiy mode. There is a subtle difference that can, in some cases, have an affect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a 2-level nested container (see below). When I click anywhere inside the
I have a div of nested ul/li items. each ul/li has a css class.
I have a nested div element: <div id=footer> <div id=footer_text> <p>My foooo text</p> </div>
I have nested div as shown below: <div class=abc> <div class=bcd> </div> </div> I
I have a div with two nested divs inside, the (float:left) one is the
I have a number of tables, which have nested tables. I using jQuery to
I have a nested form in which I would like the form fields to
So I have a nested div structure and I would like to get the
I have nested grids in my views and would like to use same CSS
Possible Duplicate: nested relative positioned div needs to have a 100% height I haven't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.