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!

CSS background images

Status
Not open for further replies.

Streetdaddy

Programmer
Jun 10, 1999
161
AU
Im using CSS to display a repeating background, but the image doesn't always render on the page? I have to scroll or resize the window for the background image to appear! Has anyone had to deal with this problem before?

Code:
<style type=&quot;text/css&quot;>
<!--
body {  background-attachment: fixed; background-image: url(images/contentleftback.gif); background-repeat: repeat-x; background-position: left top}
-->
</style>
Miles
busymiles@lan-house.net
 
Hello MadArse!

If you want a repeating background remove these attributes -
background-repeat: repeat-x; background-position: left top.

One more thing - the problem could be in small size of your bg image. Agree that drawing 1000 times image 1x1 pixel is longer and more difficult for browser than drawing 20 times image 50x50 pixels. So if you have too small image try to make it bigger (don't be affraid of image size - the difference will be too small).

Good Luck!
 
I've never had any problems... What browser are you using?

The only thing I do different is I use the short way of setting all the background properties:
Code:
background: transparent url(&quot;images/contentleftback.gif&quot;) repeat-x fixed left top
It probably won't make a difference, but you might want to try putting quotes around the path to your background image.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top