html - How can I make n number of - fit width? -



html - How can I make n number of <li> fit <ul> width? -

i'm trying li's width match ul's width, here's code: http://jsfiddle.net/4xr5v/2/

i saw questions on site , seem work adding

ul { width: 100%; display: table; table-layout: fixed; /* optional */ } ul li { display: table-cell; width: auto; text-align: center; }

but hasn't worked. javascript function works, dont know why in jsfiddle doesn't work. how can solve issue?

thanks!!

remove float: left. declaration not necessary when elements displayed table-cell. floated elements shrinkwrap contents.

html css

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -