I'm attempting to make all the li elements' width match that of my ul element. Here is the code I am using: http://jsfiddle.net/4XR5V/2/
I have looked at some similar questions on the website and tried adding:
ul {
width: 100%;
display: table;
table-layout: fixed; /* optional */
}
ul li {
display: table-cell;
width: auto;
text-align: center;
}
However, this solution has not worked for me. The javascript function I am using works fine, so I am unsure why it is not working in jsfiddle. Can anyone help me solve this issue?
Thank you!