Reputation: 51
I got a button that looks like this:
Code for the button is :
<%= mail_to "[email protected]", 'Request more info about holiday extensions here', Subject: "Hi Please include your name and email address", class: 'button-email' %>
How can I add a br tag so that the button text is displayed on 2 rows starting from "about"
REQUEST MORE INFO ABOUT
HOLIDAY EXTENSIONS HERE
Thanks in advance!
Upvotes: 1
Views: 567
Reputation: 3449
In Ruby on Rails you can do like this:
<%= mail_to "[email protected]", "Request more info about <br />holiday extensions here".html_safe, Subject: "Hi Please include your name and email address", class: 'button-email' %>
Upvotes: 3
Reputation: 4561
mail_to can take a block so do:
<%= mail_to "[email protected]", subject: "Hi Please include your name", class: 'button-email' do
<span>Request more info about</span> <br> <span>holiday extensions here</span>
end %>
You don't need the span tags but if you want to style them with color/embolden you can.
Upvotes: 4