Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Perhaps because buttons have some default styles attached and people just decided to use a div.


That's what a CSS reset is for.


HTML buttons have special behaviour in CSS (not even styles, but differences in the rules how they work) that cannot be reset using a CSS reset. I actually tried to make a button fit into the reset of the UI until I gave up and used a div.


Like what? I can't think of any "special behaviour" that I would not want to have in a button and that cannot be changed by CSS.


Vertical alignment.

"button are special element and their content is always vertically aligned by default. Even all the propertise are the same, if you don't center the text in the link, you won't get the same visual"

https://stackoverflow.com/questions/64766922/what-can-make-t...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: