I want three buttons to each take up 33% of the assigned space. They are grouped in a class "numbers".
When I define the width for the button tags, that works fine, but when I do it for all buttons in the class that they belong to, nothing happens.
html:
<html>
<link rel="stylesheet" href="opmaak.css">
<body>
<section class="numbers">
<button type="button" value=1> 1</button>
<button type="button" value=2> 2</button>
<button type="button" value=3> 3</button><br>
</section>
</body>
</html>
css when I do it on button level:
button {
width: 33%;
}
css when I try it for all buttons of that class:
button.numbers {
width:33%;
}
Could anyone point out why that is?
button.numbers {
width: 33%;
}
<html>
<link rel="stylesheet" href="opmaak.css">
<body>
<section class="numbers">
<button type="button" value=1> 1</button>
<button type="button" value=2> 2</button>
<button type="button" value=3> 3</button><br>
</section>
</body>
</html>