html - How to apply background-color to the whole area of class -
I want to change the background color of a whole square area (class = "test_detail"), but only color text Changed behind
I use Rail 4.
index.html.erb
. . & Lt;% @ calendar.each do | C | & Gt%; . . . & Lt; Separate class = "span7" & gt; & Lt; Span class = "test_detail" & gt; & Lt;% If c.day? & Gt%; & Lt;% = c.day% & gt; & Lt;% else% & gt; XXX & lt;% end% & gt; & Lt; Br> Xxx & lt;% = link_to "xxx", 'http: // xxx'% & gt; & Lt; / Span & gt; & Lt; / One side & gt; . . . & Lt;% end% & gt;
custom.css.scss
.test_detail {font-size: 12px; Color: Gray; Background color: orange; }
font size
and colors
work, but background color
does not work.
This is because you are using
span
and not < Code> div - This is the default inline, so in this case you will only see the background color changes behind the text.
Comments
Post a Comment