Link and button positioning
I need to make buttons and links of specific class to look and to be
positioned the same way. I tried this (simplified):
<html>
<head>
<title>My site</title>
<style>
.my-class {
display: inline-block;
background-color: #cccccc;
width: 18px;
height: 18px;
cursor:pointer;
box-sizing: border-box;
border: 1px solid #888888;
}
</style>
</head>
<body>
<a href="#" class="my-class" title="My link"></a>
<button class="my-class" type="submit" title="My button"></button>
</body>
</html>
But the link is positioned a bit higher than the button:
Is there a cross-browser css-only solution (no javascript) that allows to
position them on the same level?
No comments:
Post a Comment