Topic: NiftyCube (rounded corners) in Ruby on Rails

Slightly modified from original post: … d-corners/

Step 1: Download NiftCube from Basically You need only 2 files from this zip: niftycube.js and niftyCorners.css

Step2 : Copy niftycube.js to public/javascripts/ folder and niftyCorners.css to public/stylesheets/ folder in Rails

Step3:  As we are keeping css file in different directory than js file You need to change a line in niftycube.js

Change line # 37 to l.setAttribute("href","stylesheets/niftyCorners.css");   This enables niftycube to include the correct stylesheet onthe fly in rhtml.

Step4:  Include Js file using <%= javascript_include_tag 'niftycube' %> in your application.html.erb or page specific html.erb file.

Step5: Put following code inside application.html.erb between <head>...</head>

<script type="text/javascript">


In your javascript/application.js or page specific.js  Add
window.onload = function(){

Where content, nav are div IDs I want to make rounded corners. You could add as many as you want and choose whether you want rounded corners all sides or only some side. See for excellent documentation.

-DON'T PUT SPACES AFTER COMMAS in Nifty("...,...")