Netscape + CSS + margins

LinuxHater

Junior Member
Sep 21, 2000
4
0
0
I'm creating a web page using style sheets and i'm having trouble with the margins. I want the margins to be 0 so everythin is flush to the upper left corner of the screen. This works fine under IE but with Netscape there is still a small white border there and I can't seem to get rid of it. Here's the code i'm using:

<STYLE>
BODY {background-image: url(watermark3.gif); background-repeat: no-repeat;
margin-top:0%; margin-left: 0%; background-color: #ffffff}
</STYLE>

I'm using style sheets because I have an image that I want in the background of the webpage but I don't want the image to tile if the table gets extended beyond the bottom of the image. Is there any way of turning off tiling with just the basic 'background=' command? Any other way to get this image as the background that doesn't tile? Any help would be appreciated.
 

yllus

Elite Member & Lifer
Aug 20, 2000
20,577
432
126
I think I've run into a problem of a similar nature. I solved it by putting each instruction on a new line. In your case:

<STYLE>
BODY { background-image: url(watermark3.gif); }
BODY { background-repeat: no-repeat; }
BODY { margin-top:0%; }
BODY { margin-left: 0%; }
BODY { background-color: #ffffff }
</STYLE>


<< Is there any way of turning off tiling with just the basic 'background=' command? >>


I believe there is, and it has something do with putting in &quot;background=no-repeat&quot; or a similar string to that. Unfortunately at the moment I'm at work and cannot investigate further. I'll post again once I get home.
 

yllus

Elite Member & Lifer
Aug 20, 2000
20,577
432
126
Okay, here's a direct cut and paste of the code I've used to keep a background image from tiling:

<BODY BACKGROUND=&quot;backgroundimagename.gif&quot; BGPROPERTIES=&quot;FIXED&quot; STYLE=&quot;BACKGROUND-ATTACHMENT: FIXED; BACKGROUND-REPEAT: NO-REPEAT; BACKGROUND-POSITION: CENTER CENTER&quot;>

Note, this only seems to work in Internet Explorer. Considering the dwindling number of Netscape users, though... :(