I would like to change grid color on Chartist.js from default grey. I tried to override ct-grid-color setting, but probably did something incorrectly. Can anyone please suggest how to do it?
Asked
Active
Viewed 4,647 times
2 Answers
6
Just insert in your CSS.
.ct-grid{ stroke: red;}

Tunaki
- 132,869
- 46
- 340
- 423

Thái An Nguyễn
- 201
- 4
- 10
3
grid lines:
.ct-grids line {
color: steelblue;
}
.. and don't forget the labels! ..
grid labels:
.ct-labels span {
color: steelblue;
}
The reason why targeting only ".ct-grid" won't work is due to css specificity. Basically the more specific the css, the more important it becomes so ..
.ct-grids line { } > .ct-grids { }
If it's a little confusing, a nifty little tool is Keegan Street's css specificity calculator.

Butsuri
- 738
- 9
- 14
-
I got it to work using .ct-grids line { stroke: steelblue; } Thank you Butsuri – onlyvix.blogspot.com Jul 22 '15 at 00:23