html - How to set different widths for date-select? -
i have variations of line in different places:
<%= f.date_select :deadline, :order => [:month, :day, :year], class: 'date-pick', id: 'goal' %>
i tried change width making different id's select or date-select or date-pick no avail.
here examples stylesheet:
select.goal { width: 29.6%; color: green; } #goal.date-select { width: 29.6%; color: green; } .select { #goal { width: 29.6%; color: green; } } only setting width via .select { width: 29.6%; } works affects date-selects. doing wrong?!
with line:
<%= f.date_select :deadline, :order => [:month, :day, :year], class: 'date-pick', id: 'goal' %> yo can do:
#goal { width: 29.6%; color: green; } you can use #gloa.date-pick or .date-pick#goal assuming ids unique it'll overdoing it.
just remember order matter. if this:
.class1.class2 { background-color: green; } .class1 { background-color: blue; } all .class1 elements have blue background, .class2.class1 cause it'll overridden, if that's case like:
.class1 { background-color: blue; } .class1.class2 { background-color: green; }
Comments
Post a Comment