Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Unsubscribed User
4,776 PointsUsing the Flat UI kit drop down selections?
I'm working on a small project for YRS 2013 which uses Flat UI kit (free). I managed to get the buttons and text boxes styled however I cannot seem to get the drop down menus styled. The full project is here; the main CSS and HTML files are in the public and views folder respectively. I'm trying to style the drop down select element in views/index.erb. The Flat UI CSS is minified and included in public/style.min.css.
Any ideas on how to style the drop down menus using Flat UI using static CSS (one that doesn't use any JS manipulation)?
Thanks! I need to submit the project by Friday!
1 Answer
Colin Marshall
32,861 PointsHow can I "run" this app to preview it? I haven't used cloud9 before.
Unsubscribed User
4,776 PointsUnsubscribed User
4,776 PointsYou'll need to write this in the Cloud9 terminal at the bottom:
ruby app.rb -o $IP -p $PORThowever it might not work as you down't have read and write permissions. However you will be able to see the sources files so you can download the following files:style.min.css,skeleton.min.cssand put it in thepublicfolder, then download theindex.erbandlayout.erbfiles and change the extensions to.html. Now where it says<%= yield %>in thelayout.htmlfile, insert the code of theindex.htmlfile the it should look something like this:Colin Marshall
32,861 PointsColin Marshall
32,861 PointsOk I sort of got it working. Looks like you have to use some javascript. Make sure you include jquery.js, bootstrap.min.js, and bootstrap-select.js from the Flat UI js folder.
After including those, put this in a script tag below it: $(document).ready(function() { $("select").selectpicker({style: 'btn-primary', menuStyle: 'dropdown-inverse'}); });