2015-09-21 23 views

回答

1

就個人而言,我會使用CSS,但看到this discussion其中同時使用HTML和CSS提倡。

所以這樣的觀點再培訓局:

<div class="body_input"> 
    <%= label :body, "Message text" %> 
    <p><%= text_area_tag :body, @body %></p> 
</div> 

然後在CSS:

.body_input textarea { 
    width: 30em; 
    heigth: 15em; 
} 

CSS的寬度和高度,你可以改變,以符合您的要求。