Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-22-2002, 07:21 PM   PM User | #1
prezbedard
New Coder

 
Join Date: Jun 2002
Location: North of Boston
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
prezbedard is an unknown quantity at this point
Netscape NS4 backgound color CSS

this works in NS6 and IE5 but not in
NS4

basiclly it is supposed to
create a spot on the page that is white
but it does work in NS4.

according to topstyle this is a NS4 property


#behind {
position:absolute;
background:white;
top:100px;
left:0px;
width:200px;
height:100px;
z-index : auto;
}
<div id="behind"></div>

Does anybody know why this isn't displying properly in NS4?

I have tried using
background-color:white;
but no good either


Thanks
__________________
bedardinc.com
A+,Network+, MCP W2K
Sites I have worked on
patriotsweekly.com
smileysbookstore.com
prezbedard is offline   Reply With Quote
Old 06-22-2002, 07:31 PM   PM User | #2
La Gal
New Coder

 
Join Date: Jun 2002
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
La Gal is an unknown quantity at this point
#behind {
position:absolute;
background:white;
layer-background-color:white;
top:100px;
left:0px;
width:200px;
height:100px;
z-index : auto;
}
<div id="behind"></div>
La Gal is offline   Reply With Quote
Old 06-22-2002, 07:53 PM   PM User | #3
prezbedard
New Coder

 
Join Date: Jun 2002
Location: North of Boston
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
prezbedard is an unknown quantity at this point
Netscape

Thanks but it is still not working.

<STYLE type="text/css"> <!--
#behind {
position:absolute;
background:white;
layer-background-color: White;
top:100px;
left:0px;
width:200px;
height:100px;

}
-->
</STYLE>

<div id="behind"></div>
__________________
bedardinc.com
A+,Network+, MCP W2K
Sites I have worked on
patriotsweekly.com
smileysbookstore.com
prezbedard is offline   Reply With Quote
Old 06-22-2002, 08:08 PM   PM User | #4
La Gal
New Coder

 
Join Date: Jun 2002
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
La Gal is an unknown quantity at this point
Oops, forgot the clip values that NS4 needs. Don't ask me why, lol.

<STYLE type="text/css"> <!--
#behind {
position:absolute;
background:white;
layer-background-color: White;
top:100px;
left:0px;
width:200px;
height:100px;
clip:rect(0,200,100,0);
}
-->
</STYLE>

Try that.
La Gal is offline   Reply With Quote
Old 06-22-2002, 08:50 PM   PM User | #5
prezbedard
New Coder

 
Join Date: Jun 2002
Location: North of Boston
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
prezbedard is an unknown quantity at this point
Smile

Thanks so much ,La Gal

can't believe such a minor detail take so much to get to work.

so these are only necessary in NS4 if you want to specify a background color for the id in a div tag ?

layer-background-color: White;
clip:rect(0,200,100,0);
__________________
bedardinc.com
A+,Network+, MCP W2K
Sites I have worked on
patriotsweekly.com
smileysbookstore.com
prezbedard is offline   Reply With Quote
Old 06-22-2002, 09:37 PM   PM User | #6
La Gal
New Coder

 
Join Date: Jun 2002
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
La Gal is an unknown quantity at this point
Yes. NS4 will only show the background color on the part of a div that has content. IE and NS6 do not have this problem. So you need to use a workaround. Using layer-background-color along with clip:rect values is one way to get around it.

I believe another solution would be give the div a solid border of 0.1px. Such a narrow border would not show up on either browser but would cause NS4 to fill in the div with the background color even if there is no content in the div. However, I don’t find this second solution preferable because of another bug in NS4 that causes a small space (about 3px) between the border and any content you do have in the div. *sigh*

Of course you could also fill the div with non breaking spaces, but that would be very tedious.
La Gal is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:47 AM.


Advertisement
Log in to turn off these ads.