So I am using the CSS framework Bulma.io.
Normally, without it, when doing
body {
background: black;
}
the background turns black.
But when I use Bulma.io, only the background behind a written text turns black and the rest of the website stays white. So does someone know how I can make the entire website turn black like it normally does without a framework?
How can I change the background of a website using Bulma?
Asked Answered
Can you provide an example of what you're working with? My snippet below shows how you can change the background color. Other than setting the background-color property, I also set the body height to be the full height of the view.
body {
background-color: black;
height: 100vh;
}
<!DOCTYPE html>
<html>
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.2/css/bulma.css" rel="stylesheet"/>
</head>
<body>
</body>
</html>
You can apply the background helper
<body class="has-background-grey-lighter"></body>
You can make that by modifying body background color from Generic variables [$body-background-color] override this variable before importing Bulma. an easy
explanation is now available https://bulma.io/documentation/customize/variables/
If you want to change the background of the whole page, you need to give the html tag a color class.
example:
<html lang="en" class="has-background-dark"></html>
© 2022 - 2024 — McMap. All rights reserved.