Text alignment

0

I'm trying to make a text appear in alignment. This text is in a variable in ruby on rails. As follows:

<div class="grid" data-masonry='{ "itemSelector": ".grid-item", "columnWidth": 400 }'>

 <div class="col-12" style="width: 250px;height: 350px; padding: 0;margin: 0;margin-right: 100px;text-align: center;">  

   <div class="col-12 col-no-left">
     <a class="service-card" href="/servico/<%= service.permalink %>">
     <h3 class="title" style="text-align: center;"><%= service.name %></h3>
     <p class="description" style="text-align: justify;"><%=service.description.truncate(250).html_safe  %>
    <p class="btn">ver mais</p></p>
    <span><%= service.categories.map(&:name).join(',') %></span>
                            </a>
                        </div>
                </div>  

The text does not appear justified! Can you help me? grateful!

    
asked by anonymous 30.06.2016 / 16:42

1 answer

0

So I understand you want to justify the text that will be in the description class.

In this case line of code:

<p class="description" style="text-align: justify;"><%=service.description.truncate(250).html_safe  %>

Since the text is not being justified, try altar to style="text-align: justify; to style="text-align: justify !important;" .

If this does not work, post your complete code with css for a more detailed analysis.

    
02.07.2016 / 01:31