Note that there are some explanatory texts on larger screens.

plurals
  1. POBootstrap Dropdown Not Styling Properly
    text
    copied!<p>I'm having an issue with twitter/bootstrap dropdowns not being styled properly. I'm in Rails 3, using the bootstrap-sass gem. The dropdown functions properly, coming down when I click the button, but doesn't style.</p> <p>Basically it looks like this: <a href="http://i.imgur.com/wY7S4Eg.png" rel="nofollow">broken</a></p> <p>When it ought to look like this: <a href="http://i.imgur.com/oZKBPJN.png" rel="nofollow">working</a></p> <p>These two screenshots were taken of different apps forked about two months ago from the same code base. They have identical custom CSS styling, of which none of it should affect the dropdown, and the working one is only importing the alert, collapse, dropdown, modal, and transition bootstrap plugins while the broken one uses the all-in-one bootstrap.js. I've tried deleting bootstrap.js and replacing it with only those plugins but the problem persists.</p> <p>The dropdowns are also called the same way, by rendering a partial with locals.</p> <p>The render:</p> <pre><code>&lt;%= render :partial =&gt; 'layouts/dropdown', :locals =&gt; { :space =&gt; true, :collection =&gt; @statuses, :title =&gt; "Set Status", :subtitle =&gt; "Statuses:", :label =&gt; -&gt;s{s}, :value =&gt; -&gt;s{"&amp;status=" + s}, :path =&gt; set_status_tickets_path, :id =&gt; "ticket-status", :type =&gt; :note } %&gt; </code></pre> <p>The partial:</p> <pre><code>&lt;div class="btn-group pull-right toggleCheck" style="display:none;" id='&lt;%= id %&gt;'&gt; &lt;a class="btn dropdown-toggle" data-toggle="dropdown" href="#"&gt;&lt;%= title %&gt;&lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt; &lt;ul class="dropdown-menu" style="right: 0; left: auto;"&gt; &lt;% if type == :search %&gt; &lt;li style="padding:5px 10px;"&gt;&lt;input class="drop-search focus-open hold" type='text' placeholder='Search' style="margin:0px;"&gt;&lt;/li&gt; &lt;% elsif type == :note %&gt; &lt;li style="padding:5px 10px;"&gt;&lt;textarea placeholder='Status notes' class="hold focus-open note-box" rows="4" style="margin:0px; resize: none;"&gt;&lt;/textarea&gt;&lt;/li&gt; &lt;% end %&gt; &lt;li style="padding:5px 10px; font-weight:700;"&gt;&lt;%= subtitle %&gt;&lt;/li&gt; &lt;div class="choices"&gt; &lt;% collection.each do |c| %&gt; &lt;li&gt;&lt;%= link_to (label.(c) + '&lt;span class="comment"&gt;&lt;/span&gt;').html_safe, '#', :value =&gt; value.(c), :path =&gt; path, :iden =&gt; label.(c).downcase.gsub(/\s/, '-') %&gt;&lt;/li&gt; &lt;% end %&gt; &lt;/div&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>Can anyone shed some light on what I might be doing wrong here? Also this is my first question, so if I've done something wrong or haven't included enough information let me know. Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload