Making the 'Back' link look the same as form.submit "Save"

Does anybody know how Rails paints that cool blue box around the <%=
form.submit "Save" %>
In most of my forms I've got a "Back" link ( ex: <%= link_to 'Back',
return_path %>.

I'd like this link to share the same 'look and feel'.

When I look at the browser source the code that rails generates it
shows this;

  <p>
    <input id="record_submit" name="commit" type="submit"
value="Save" />
  </p>

Has anybody built .css around any of these properties to make this
link look like the same graphic button created by <%= form.submit
"Save" %>?

David

What "cool blue box?" My submit buttons just look like buttons, so you
probably already have some CSS that you could copy.

InventoryTrackers wrote:

Does anybody know how Rails paints that cool blue box around the <%=
form.submit "Save" %>
In most of my forms I've got a "Back" link ( ex: <%= link_to 'Back',
return_path %>.

try to use Safari browser :slight_smile: apple.com/safari

.snap

tom

Tom Z Meinlschmidt wrote:

InventoryTrackers wrote:

Does anybody know how Rails paints that cool blue box around the <%=
form.submit "Save" %>
In most of my forms I've got a "Back" link ( ex: <%= link_to 'Back',
return_path %>.

try to use Safari browser :slight_smile: apple.com/safari

Yes, If the OP is talking about the Mac OS X "focus ring" (light blue
border surrounding the first responder) then yes, that's completely
implemented by Safari and has nothing to do with Rails, HTML or CSS.

I have found that the best solution to this problem is to use an image
button for the submit button, and then use css to apply the same image
to the back link. It's accessible and requires no javascript.

@Robert:

I totally agree with your approach. I was merely stating how the
requested goal could be achieved. As web experts, you and I understand
how the web works and how users perceive things, but our clients often
demand that we do things in different ways.

I DO NOT MARSHALL

  1. 364.gif349.gif