How to center <li> element to the center

How to center <li> element to the center
0

#1

hi all

i’m working on the weather project. here is the link to my codepen : http://codepen.io/spyshow/pen/pbrRBL

i have 3 bugs in it and i can’t solve them :

  1. i’m using weather icons for bootstrap : https://erikflowers.github.io/weather-icons/ when i use them i can’t center them horizontally and vertically probably. how can i?

  2. after the script check if the temp is more than 25 C it will change some color for the background. if i tried to change the .my-btn color using $(’.my-btn’).css({‘color’:’#d35400’}) but i’s not working .

  3. i’m using chart.js to draw chart … also when the script check if the temp is more than 25 C it will change some color for the background. i couldn’t change the color of the chart . also if you press the F/C button it draw another chart above the old one so when you hover over the chart it will display the old and the new points.


#2

ok for now i solved 2 of the 3 :

  1. i used flex to center them
  2. it’s now working after help from chart.js support
  3. still have the same problem .

#3

http://www.chartjs.org/docs/#chart-configuration-colors

there is global namespace, so object inherit all properties that is not specifed in datasets

Chart.defaults.global.defaultColor

but didn’t succeed to fix ur pen
i don’t know why this not working

Also u may want to use d3.js to shown visualisation, cause in second part of this camp is used…


#4

Here’s an awesome post on how to center elements both vertically and horozontally