2016-03-04 26 views
-1

我是新來的導軌和編程,我已經建立一個Rails應用程序與CSS不是在Rails應用程序正常工作

我又增加了不同的CSS文件兩個控制器,但我的整個應用程序兩種不同的控制器,產品及事件只從product.css文件中獲取css。

我application.css.scss

/* 
* This is a manifest file that'll be compiled into application.css, which will include all the files 
* listed below. 
* 
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, 
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path. 
* 
* You're free to add application-wide styles to this file and they'll appear at the bottom of the 
* compiled file so the styles you add here take precedence over styles defined in any styles 
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new 
* file per style scope. 
* 
*= require_tree . 
*= require_self 
*= require font-awesome 
*/ 

@import "bootstrap-sprockets"; 
@import "bootstrap"; 

body { 
    padding-top: 100px; 
} 

我products.css

body { 
    font-size: 11px; 
    font-family: 'Open Sans', sans-serif; 
    color: #4A4A4A ; 
    text-align: center; 
} 

.wrap { 
    background: #fff; 
    margin: 20px auto; 
    display: block; 
    width: 300px; 
    height: 380px; 
    padding:20px; 
    border-radius: 2px 2px 2px 2px; 
    -webkit-box-shadow: 0 1px 4px 
    rgba(0, 0, 0, 0.3), 0 0 40px 
    rgba(0, 0, 0, 0.1) inset; 
    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; 
    box-shadow: 0 1px 4px 
    rgba(0, 0, 0, 0.3), 0 0 40px 
    rgba(0, 0, 0, 0.1) inset; 
    float: left; 
    margin-right: 29px; 
} 

.wrap img { 
    width: 100%; 
    margin-top: 15px; 
} 

p{ 
    margin-top: 15px; 
    text-align: justify; 
} 

h1{ 
    font-size: 20px; 
    font-weight: bold; 
    margin-top: 5px; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3); 
} 

a{ 
    text-decoration: none; 
    color: #4A4A4A !important; 
} 

a:hover{ 
    text-decoration: underline; 
    color: #6B6B6B !important ; 
} 

** 

event.css

.section { 
    clear: both; 
    padding: 0px; 
    margin: 0px; 
} 
.group:before, 
.group:after { 
    content:""; 
    display:table; 
} 
.group:after { 
    clear:both; 
} 
.group { 
    zoom:1; 
} 
.listview_1_of_3{ 
    display: block; 
    float:left; 
    margin: 0% 0 0% 1.6%; 
} 
.listimg{ 
    display: block; 
    float:left; 
} 
.text{ 
    display: block; 
    float:left; 
    margin: 0% 0 0% 3.6%; 
} 
+0

不要重新發布的問題。 – cimmanon

回答

0

你^ h AVE進口product.css文件到application.css.scss

添加以下代碼行application.css.scss

@import "products" 
@import "event" 
+0

no sir它不起作用 –

+0

你想添加css的其他css文件是什麼? –

+0

我用event.css文件編輯了問題@Ganesh Kunwar –

相關問題