4 ms·
Perhaps because buttons have some default styles attached and people just decided to use a div.
by kodt 6y ago
Perhaps because buttons have some default styles attached and people just decided to use a div.
- grishka 6y agoThat's what a CSS reset is for.
- moring 6y agoHTML 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.
- FrontAid 6y agoLike 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.
- moring 6y agoVertical 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-two-elements-with-equal-css-properties-look-different https://stackoverflow.com/questions/64766922/what-can-make-t...