How to include html tag inside rails label tag

84 views
Skip to first unread message

Manoj M.

unread,
Oct 13, 2012, 1:59:27 AM10/13/12
to rubyonra...@googlegroups.com
Hello pls help me,
below is my code



<label
style="width:175px;text_align:left;float:left;font-weight:bold;font-size:13px;">Group
<font size="1" color="red">*</font></label>


How to write this html code inside label_tag of rails ????
am clear till <font size="1" color="red">*</font>...

label_tag
'Group',nil,:style=>'width:175px;text_align:left;float:left;font-weight:bold;font-size:13px;'

My problem is how to include <font size="1" color="red">*</font> into
this label_tag

Thanks in advance,
Manoj

--
Posted via http://www.ruby-forum.com/.

Quang Dũng

unread,
Oct 13, 2012, 4:10:58 AM10/13/12
to rubyonra...@googlegroups.com
I think it's always better if you give it a class name then styling it in CSS file. Never do inline styling :)

Norbert Melzer

unread,
Oct 13, 2012, 5:05:17 AM10/13/12
to rubyonra...@googlegroups.com

I second that, depending on the HTML version you are using font and similar are deprecated and shouldn't (mustn't?) be used any more.

Am 13.10.2012 10:11 schrieb "Quang Dũng" <nxqd....@gmail.com>:
I think it's always better if you give it a class name then styling it in CSS file. Never do inline styling :)

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/BMf7q-52MhYJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages