简体   繁体   中英

ruby on rails css

I'm trying to color my view using css. The controller is workflows_controller. Hence i added the following code to the workflows.css.scss:

.folder_section {
  text-align:center;
  color: #244;
}

My view is

<div class="folder_section" id="folder_section">
                <%= form_for :folder_name, :remote => true, :method => "get", :url => {:action => "show"} do |f| %>
                <%= f.select :foldernames, options_for_select(@folders, @folders.first)%>
                <%= f.submit "Submit folder"%>
                <% end%>
</div>

The select box is aligned to the center but i could not see any color. I copy pasted the same code in the view itself. But still i could not see any color. Please let me know why the select box is aligned to the center but not colored. I looked into the web and some pdf documents. Everyone says that the controller.css.scss will take care of styling when you add the css code to it. Thanks

The css color attribute is for setting the font color and the color you chose is quite close to black so you may not see a change.

Have you tried to set the background-color attribute to #244 ?

Or try to change the select field color attribute by defining it in the code

.folder_section { 
  select {
    color: #244; 
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM