# Link\_to image\_tag puts a box round my image

**URL:** <https://www.ruby-forum.com/t/link-to-image-tag-puts-a-box-round-my-image/111936>\
**Category:** Rails\
**Created:** [August 13, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/link-to-image-tag-puts-a-box-round-my-image/111936 "2007-08-13T17:06:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [August 13, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/link-to-image-tag-puts-a-box-round-my-image/111936/1 "2007-08-13T17:06:08Z")

</div>

I’ve got a rather long conditional statement that either displays a  
link\_to(image\_tag(blah)blah) or just an image\_tag (i’ve edited it a bit  
to show the structure):

\<%= (article.score\_from\_user(:user\_id =\> session[:user]) != -1)  
?  
(link\_to image\_tag("/images/down\_arrow\_grey.jpg", :alt =\> “down”),  
:controller=\>“article”, :action =\> “change\_score”, :article\_id =\>  
article, :user\_id =\> session[:user], :points =\> -1)  
:  
(image\_tag("/images/down\_arrow\_red.jpg", :alt =\> “down”)) %\>

However, i don’t think the above is really the issue in my question,  
which is “why is link\_to putting a box around my image\_tag link?”

thanks in advance! max

---

<div class="post-metadata">

**Author:** ![cmaxvv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/85f322/32.png) [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Post date:** [August 13, 2007, 5:14pm UTC](https://www.ruby-forum.com/t/link-to-image-tag-puts-a-box-round-my-image/111936/2 "2007-08-13T17:14:28Z")

</div>

Never mind! I just needed to tell the image\_tag :border =\> 0 ! Doh.  
thanks for looking!
