As an aspiring Bootstrap and Ruby on Rails developer, I am in need of an adaptable "div" element. Here is my current code snippet:
<div class="container-fluid">
<div class="row-fluid">
[if true]
<div class="span2">
div1
</div>
[endif]
<div class="span10">
div2
</div>
</div>
</div>
I want div2 (span10) to be adaptable, meaning:
If "true", **div1** should take up 20% and **div2** should take up 80%
If "not true", **div1** should not be displayed and the width of dev2 will be 100%.
Despite using span10
, I noticed that the width always remains at 82.906%
. How can I achieve this?
Here are the details of my environment:
- Ruby: ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]
- Rails: gem 'rails', '3.2.13'
- Bootstrap: gem "bootstrap-sass", "~> 2.3.2.2"
Thank you in advance for your help!