"margin: 0 auto" won't center the <a> tag
Hi guys I have styled an anchor tag which looks like a button. I'm trying center it in the container but it won't happen. Does anyone know how to solve this ?
11 Replies
the parent needs to be taking the entire width
also, try
display: inline-block
unfortunately i tried both but didn't work :((
then can you post a live example?
it actually worked when i set text-aligned: center in the parent element
that is another way, yes
it all depends on the surrounding elements
but there seems to be an overlapping issue now
show a live example and explain the issue
sorry my bad i have had commented out the
and all issues are gone?
yes! Thank you
you're welcome