Setting Layer/DIV Background Colors

Setting Layer/DIV Background Colors

Often it is desirable to set a background color for an entire layer or DIV region, much like setting the background color for a whole table. Setting a layer background color should work the same for version 4 of both Netscape and Internet Explorer but it doesn’t. The Cascading Style Sheet (CSS) background-color:color sets the background color in Internet Explorer, but only colors the background of text in Netscape 4. To get the same effect in both browsers, use two tags in sequence: background-color:color for Internet Explorer and layer-background-color:color for Netscape. For example:


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist