twitter-bootstrap-rails

Font-awesome, input type 'submit'

[亡魂溺海] 提交于 2019-12-17 05:32:30
问题 There seems to be no class for input type 'submit' in font-awesome. Is it possible to use some class from font-awesome for button input? I've added icons to all buttons (which actually links with class 'btn' from twitter-bootstrap) in my applications, but can't add icons on 'input type submit'. Or, how to use this code: input#image-button{ background: #ccc url('icon.png') no-repeat top left; padding-left: 16px; height: 16px; } html: <input type="submit" id="image-button">Text</input> (which I

Font-awesome, input type 'submit'

*爱你&永不变心* 提交于 2019-12-17 05:32:00
问题 There seems to be no class for input type 'submit' in font-awesome. Is it possible to use some class from font-awesome for button input? I've added icons to all buttons (which actually links with class 'btn' from twitter-bootstrap) in my applications, but can't add icons on 'input type submit'. Or, how to use this code: input#image-button{ background: #ccc url('icon.png') no-repeat top left; padding-left: 16px; height: 16px; } html: <input type="submit" id="image-button">Text</input> (which I

Why is the Twitter Bootstrap “fixed” layout NOT fixed?

回眸只為那壹抹淺笑 提交于 2019-12-14 03:55:51
问题 The Twitter Bootstrap site reads as follows: The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container"> . Quote from http://twitter.github.com/bootstrap/scaffolding.html#layouts That's exactly what I have in my HTML but when I inspect the element, I see this CSS apply to it: .container, .navbar-fixed-top .container, .navbar-fixed-bottom .container { width: 1170px; } By the way, if I override that CSS rule by adding... div

twitter-bootstrap-rails: error loading stylesheets

十年热恋 提交于 2019-12-13 03:09:15
问题 I'm trying to use the Twitter-bootstrap-rails gem for the first time and I'm having some issues. I deleted all the stylesheets that rails generates except for application.css and I ran rails g bootstrap:install less to get the bootstrap_and_overrides.css.less file. According to the documentation you need to require bootstrap_and overrides in application.css which I did. Application.css looks like this: * *= require_tree . *= require bootstrap_and_overrides.css.less *= require_self */ and

therubyracer install error. I tried all other SO solutions and still no luck

爱⌒轻易说出口 提交于 2019-12-11 06:25:35
问题 I think this is a common problem of installing therubyracer gem in Rails. It is a dependency for the twitter-bootstrap-rails gem. I have tried solution such as this: `gem install therubyracer` fails on Mac OS X Lion Here is the portion of my gem file that's relavant: group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes gem 'therubyracer', :platforms => :ruby gem 'uglifier', '>= 1.0.3' gem

Twitter bootstrap navbar auto-expands on mobile/tablet

安稳与你 提交于 2019-12-10 16:36:40
问题 I'm using Twitter Bootstrap. It works very well and the navbar works well. It is responsive and adjusts accordingly, but when you shrink the screen on desktop or when you pull up the site on a mobile phone, it starts off expanded already taking up a bunch of the screen. I want it to start off collapsed with the option to expand. The code is below: <div class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <!-- .btn-navbar is used as the toggle for collapsed

How can a dropdown be stylized when using twitter bootstrap with simple_form in a Rails app?

China☆狼群 提交于 2019-12-08 10:00:32
I am using simple_form and twitter-bootstrap-rails gems. Every thing is working fine but somehow drop-down is not getting stylized by twitter bootstrap rails ..it shows like normal forms. <%= f.input :category, :collection => ["one", "two", "three", "four"], :input_html => {:class => 'dropdown'}, :label => 'Send To', prompt: "Choose From List" %> IMAGE OF DROPDOWN SHOWING: IMAGE OF DROPDOWN NEEDED AS IN BOOTSTRAP One way to get stylized dropdowns with SimpleForm and Bootstrap is to use Bootstrap-Select . There is a Rails Gem for it; add to your Gemfile and do a bundle : gem 'bootstrap-select

How can a dropdown be stylized when using twitter bootstrap with simple_form in a Rails app?

我怕爱的太早我们不能终老 提交于 2019-12-08 07:26:40
问题 I am using simple_form and twitter-bootstrap-rails gems. Every thing is working fine but somehow drop-down is not getting stylized by twitter bootstrap rails ..it shows like normal forms. <%= f.input :category, :collection => ["one", "two", "three", "four"], :input_html => {:class => 'dropdown'}, :label => 'Send To', prompt: "Choose From List" %> IMAGE OF DROPDOWN SHOWING: IMAGE OF DROPDOWN NEEDED AS IN BOOTSTRAP 回答1: One way to get stylized dropdowns with SimpleForm and Bootstrap is to use

Warning using twitter-bootstrap-rails generators on Windows

怎甘沉沦 提交于 2019-12-05 22:44:47
问题 I'm trying to use the twitter-bootstrap-rails gem on my first Rails project, on a Windows 7 machine running ruby 1.9.3p125 (2012-02-16) [i386-mingw32] Rails 3.2.1 twitter-bootstrap-rails 2.1.1 When I run rails g bootstrap:install I get the following: [WARNING] Please install gem 'therubyracer' to use Less. C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:74:in `require': cannot load such file -- twitter/bootstrap/rails (LoadError) from C:

How to embed font-awesome icons into submit_tag

♀尐吖头ヾ 提交于 2019-12-04 16:01:22
问题 Trying to user font awesome icons for my buttons but I cant get it to show in the submit_tag <%= submit_tag icon("search"), class: "btn-primary", style:"width:40px;" %> output: <input class="btn-primary" name="commit" style="width:40px;" type="submit" value="<i class='icon-search' style='font-size:1em' ></i>"> helper: def icon(name, size=1) #icon("camera-retro") #<i class="icon-camera-retro"></i> html = "<i class='icon-#{name}' " html += "style='font-size:#{size}em' " html += "></i>" html