background image and CSS border

Hi, I am working on a new page, and have applied a CSS border to a background image, but the border does not appear to show in IE or FF.  

It seems I am missing something...any ideas?
Who is Participating?
Tony O'ByrneSenior Web DeveloperCommented:
Rather than applying a graphical border to the image, include the image in another <div class="imageborder"> block...  Use a class something like the class below. The div wouldn't care then if its contents are an image or text or a cow - it'll try to put a border around it regardless.

If that doesn't work, then just add some margin in the imageborder class - I don't know if the image will hide the border if the image and containing <div> are the same size.
  border-width: 1px;
  border-style: solid;
  border-color: blue;

Open in new window

As far as I know, borders are not supported on background images. You could use Photoshop or some other editor to add the border to the image itself.
For instance, see this tutorial :

and common types of borders at

wood1eAuthor Commented:
So border can be used with background image?
It sounds like   ;)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.