Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

any way i can color-fill an empty div in ns4?

Status
Not open for further replies.

iostream71

Programmer
Mar 13, 2002
229
US
i noticed in ns4 if i have a div that is empty, it won't paint to the full size unless it has content, like this:

<div style=&quot;width:200px height:200px; color:#000000&quot;>& n b s p;</div>

how can i fill that entire div with my color?
 
supporting NS4 will take up a lot of your developement time. I recommend you don't do it unless you absolutly need to (keep in mind that almost all statistics relating to browser share show that NS4 is dropping below 5% of market share). I would put effort towards supporting NS6 instead wich is by far easier and more fun.

However if you want to fill the backgorund color of your div in NS4 you would need to do clip it to the size you want it to have.

<div style=&quot;width:200px height:200px; color:#000000; clip:rect(0,200,0,200);&quot;>& n b s p;</div>

Mind you I forget wich values have to be where. You might have to try stuff like (200,0,200,0) as well to find the correct way of doing this.

I hope this helps.

Gary Haran
 
yeah, i don't usually bother with older browsers at all. i just wanted to make a site that worked in all versions, just for a challenge(more like headache) =)
 
tried the clipping and it didn't work. i have the values set properly too
 
<div style=&quot;position:absolute; left:50px; top:100px; width:30px; height:30px; clip:rect(0px 30px 30px 0px); background-color:red; layer-background-color:red;&quot;>
</div>

as seen on dansteinman.com

the clipping is done in the two center values. :) Sorry. :) Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top