Topic: Border Around Button??

I can not seem to figure out how to get rid of the black border around my button.

http://www.ourwebzone.com/junk/btnborder.gif

Here is my code...

CSS CODE

#homebtn {
  width: 101px;
  height: 25px;
  position: absolute;
  left: 1px;
  top: 100px;
  z-index: 1;
}

RAIL CODE IN RHTML
...
<div id="homebtn">
    <%= link_to(image_tag("/images/btn_home.png"), {:controller => "code"}) %>
</div>
...

FYI.. my DIV works because I can position the button where I want.
How do i get rid of the border??

Thanks

smile

Last edited by fwhilton (2007-02-12 20:57:16)

Re: Border Around Button??

Well... I figured it out.

I needed to add the ":border => 0" attribute to the code

...
<%= link_to(image_tag("/images/btn_home.png", :border => 0), {:controller => "code"}) %>
...

Thanks

smile

Re: Border Around Button??

when images are used in links they put a border around them. To disable this globally (as most people do) add "img {border: 0}" to your css.

Last edited by PhilThompson (2007-02-16 11:05:21)