ruby on rails - content_tag generating weird html -
ruby on rails - content_tag generating weird html -
i have snippet in presenter:
html << helpers.content_tag(:li, class: 'dropdown-header') helpers.content_tag('span', "status: #{online_srt}", class: 'glyphicon glyphicon-off') end
, generated html this
<li class="dropdown-header"> <span class="glyphicon glyphicon-off">::before status: online</span> </li>
which makes output pretty weird
the 'online' string has lot of spaces after 'status', , makes no sense. think ::before
1 responsible this...what can create output printed without ::before?
you have pseudo-element, .glyphicon:before
in css files.
do utilize twitter bootstrap? suggest way utilize glyph icons. need set text after span
tag, like
<li class="dropdown-header"> <span class="glyphicon glyphicon-off"></span>status: online </li>
ruby-on-rails ruby-on-rails-3 twitter-bootstrap
Comments
Post a Comment