Reputation: 61
I'm very new to website designing an am trying to change the background colour of a button, but for some reason it's not working. Could someone please help?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="widthz=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<title>Title</title>
</head>
<body>
<script src="application.js"></script>
<h3>Small Header</h3>
<button id="InformationButton">Information</button>
</body>
</html>
styles.css:
.InformationButton {
background-color: aqua;
border : solid;
}
Upvotes: 1
Views: 32
Reputation: 456
You are using a CSS ID selector to refer to your button. Either change the CSS to a class selector :
#InformationButton {
background-color: aqua;
border : solid;
}
or change your button element to
<button class="InformationButton">Information</button>
Upvotes: 0