Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to style a span content tag using inline styles

I want to create a span with inline styles for an email:

<span style="display: inline-block; width: 16;"></span>

In my helper I have tried this:

content_tag(:span, style: "display: inline-block; width: 16;")

The words "display: inline-block; width: 16;" are displayed on the screen.

like image 307
grabury Avatar asked Mar 15 '14 09:03

grabury


1 Answers

content_tag(:span, nil, style: "display: inline-block; width: 16;")

http://apidock.com/rails/ActionView/Helpers/TagHelper/content_tag

like image 99
astropanic Avatar answered Sep 28 '22 01:09

astropanic