0

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

3
  • 2
    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; } } Commented Jun 26, 2012 at 21:31
  • @Stevens this seems to be the correct answer, why have you posted it as a comment? Commented Jun 26, 2012 at 21:36
  • Hi Stevens, that works. Thank you. I changed the background color in controller.css.scss file and it is reflected on my view Commented Jun 26, 2012 at 21:38

1 Answer 1

1

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; 
  }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.