css - What can cause an anchor tag does not fill a li tag? -


basically, have ul 3 li's, floated left, first , last width: 20% , second li width: 60%.

i have anchor tag inside second li element, text, , display: block; width: 100%; text-align: center;.

the thing text not centered because anchor tag doesn't fill li tag.

what can cause ?

edit:

i had float: left; in anchor tag. stupid mistake, thank all.

tried case out in this jsfiddle have working intended.

i removed anchor tag:

width: 100%; 

check out , compare, if don't find messed up, maybe there else in code prevents working fine.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -