Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using Sprite as background

 
J Haley
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having problems changing an existing site to use sprites. In the example below, I'm using the attached sprite to wrap my test text with a background. The background consist of 3 images, but I can't get the top image to render. This is my first use of sprites and I'm not sure what I'm missing.


sprite_hor_bgBox.png
[Thumbnail for sprite_hor_bgBox.png]
sprite that contains 3 images (top, middle and bottom)
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Eric
 
J Haley
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At first I thought this fixed it, but it does not. Once I include the doctype that our projects using the top sprite gets cut off.

sprite_hor_bgBox.png
[Thumbnail for sprite_hor_bgBox.png]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-444 what? Meters, miles, yards, parsecs, lightyears?

Give some units.

Eric
 
J Haley
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
px

Thanks! I think that's what I was missing. I've added "px" to my units and it seems to be rendering properly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic