Forum Moderators: not2easy

Message Too Old, No Replies

css background-repeat not the same in safari or IE

         

tyio

1:57 pm on May 13, 2004 (gmt 0)

10+ Year Member




With the following code, the background repeats vertically in IE but not in Safari ... does anybody know why?

#top {
background: url(../images/top-pic5.jpg) transparent no-repeat bottom right;
color:#000;
/* border-bottom:1px #666 solid; */
padding-top:10px;
padding-left:20px;
text-align:left;
width:740px;
voice-family: "\"}\"";
voice-family:inherit;
width:749px

}

Any suggestion/ideas appreciated. Thanks

Bonusbana

2:02 pm on May 13, 2004 (gmt 0)

10+ Year Member



Safari is right, it shouldnt repeat at all.

background: url(../images/top-pic5.jpg) transparent no-repeat bottom right;

You should also place any color definition before the url like so (this is probalby why IE repeats the image):

background: transparent url(../images/top-pic5.jpg) right;

...and finally to repeat the bg vertically:

background: transparent url(../images/top-pic5.jpg) repeat-y right;

Bonusbana

2:04 pm on May 13, 2004 (gmt 0)

10+ Year Member



Oh sorry, welcome to webmaster world!

tyio

2:11 pm on May 13, 2004 (gmt 0)

10+ Year Member



thank you! ;)

ooops sorry I posted a wrong piece of code (copy/paste human error), here's the real problem:
so it displays ok on mozilla firefox and IE but safari screw this up

/*background: url(../images/framebkgd8.jpg); background-repeat:repeat-y;position:relative;
margin-right:auto;
margin-left:auto;
margin-top:0px;
padding:0px;
text-align:left;
width:750px;
voice-family: "\"}\"";
voice-family:inherit;
width:770px
} */

thanks for your help

Bonusbana

2:22 pm on May 13, 2004 (gmt 0)

10+ Year Member



Repeats fine here (safari 125):


#yo {
background: #eee url(body_bg.gif) repeat-y;
margin: 0 auto;
width:750px;
voice-family: "\"}\"";
voice-family:inherit;
width:770px
}


<div id="yo">
<p>bla</p>
<p>bla</p>
</div>

Maybe just a bad char in the css that made safari throw up.

tyio

9:38 pm on May 13, 2004 (gmt 0)

10+ Year Member



ok thanks now I can search on another path...
I checked all my CSS and html files I still don't understand why the background doesn't repeat...

tyio

4:45 pm on May 14, 2004 (gmt 0)

10+ Year Member



Ok everything is ok now but I can't tell what I messed up

After I cleaned the code (2 hours of W3C validation corrections for my CSS and my XHTML 1.0) my page diplayed the way I wanted.

thanks for your help