# Targeting the public/images directory?

**URL:** <https://www.ruby-forum.com/t/targeting-the-public-images-directory/165433>\
**Category:** Rails\
**Created:** [April 13, 2009, 11:57pm UTC](https://www.ruby-forum.com/t/targeting-the-public-images-directory/165433 "2009-04-13T23:57:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [April 13, 2009, 11:57pm UTC](https://www.ruby-forum.com/t/targeting-the-public-images-directory/165433/1 "2009-04-13T23:57:16Z")

</div>

I am altering the default scaffold.css inside of public/stylesheets to  
include this:

td {  
/\* background-image:url(…/…/…/public/images/product\_bkgrnd1.png); /  
\*  
/\* background-image:url(…/public/images/product\_bkgrnd1.png);\*/  
}

How do I target the file public/images/product\_bkgrnd1.png so that it  
will render in a View’s

 as specified in the scaffold.css.

I have tried a few different paths as you can see above, but no love  
yet.

Thanks for helping out the rookie here.

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [April 14, 2009, 12:03am UTC](https://www.ruby-forum.com/t/targeting-the-public-images-directory/165433/2 "2009-04-14T00:03:42Z")

</div>

On Mon, Apr 13, 2009 at 2:56 PM, elliottg [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> How do I target the file public/images/product\_bkgrnd1.png so that it  
> will render in a View’s as specified in the scaffold.css.

td { background-image: url( “/images/product\_bkgrnd1.png” ); }

## HTH,

Hassan S. ------------------------ removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![elliottg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b77776/32.png) [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Post date:** [April 14, 2009, 12:16am UTC](https://www.ruby-forum.com/t/targeting-the-public-images-directory/165433/3 "2009-04-14T00:16:00Z")

</div>

Perfect!

Thanks a ton.

Elliott

On Apr 13, 6:02 pm, Hassan S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
