Friday, April 20, 2012

For a Rails View *.html.erb : where can I place the style sheet?

I have this file:



app/views/listings/list.html.erb


in my rails project.
Here are the contents of the file:



<h1>This file is:"list.html.erb"</h1>  












html { height: 100% }

body { height: 100%; margin: 0; padding: 0 }

#map_canvas { height: 100% }




src="http://maps.googleapis.com/maps/api/js?key=key&sensor=false">



<%=javascript_include_tag 'application'%>  
















Id like to apply a style sheet to it. Where should I place the stylesheet? I tried placing the code in this file:



app/assets/stylesheets/listings.css.scss


But the style wasn't applied to the html file. Also do I need to change anything in my html view file to include the style sheet?



This is the style sheet that resides at : "app/assets/stylesheets/listings.css.scss"



// Place all the styles related to the Listings controller here.  
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
.listings
{
table tr td
{
padding: 5px;
vertical-align: top;
}


dt
{
color: #232;
font-weight: bold;
font-size: larger;
}

dd
{
margin: 0;
}
}
#map_canvas
{
width: 80%;
height: 80%;
}


So wondering if anyone can give me a hand?



Thanks





No comments:

Post a Comment