Forum Moderators: not2easy

Message Too Old, No Replies

No repeat background using CSS doesn't work on Netscape?

         

irock

8:12 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I noticed that no-repeat background function CSS isn't compatible with netscape 7.

.news { background: white url(images/pic_news.jpg) no-repeat top left left }

Is there another similar no-repeat function that works across all major browsers?

Thanks!

grahamstewart

8:19 am on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Works fine for me - I think your problem is the extra left.
Try..

.news { background: #fff url(images/pic_news.jpg) no-repeat top left; }

outrun

8:21 am on Jun 18, 2003 (gmt 0)

10+ Year Member



This is for no repeat backgrounds AFIAK

.news { background: white url(images/pic_news.jpg) BACKGROUND-REPEAT: no-repeat}
<added> And no "top left left" might as well show you the whole thing</added>

Works on all browsers for me.
regards,
Mark

drbrain

7:04 pm on Jun 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



CSS2 browsers are supposed to ignore the entire property if it any of the values are incorrect, some are incorrectly forgiving. As grahamstewart suggests, the extra left is probably what is keeping it from working.

outrun: He's using the shorthand notation, so doesn't need the extra background-repeat property. The 'top left' is shorthand for the background-position property. It has no effect on how much of the background is visible, only where with respect to the padding edge it appears.