How can I change the background of a website using Bulma?
Asked Answered
H

4

7

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?

Hypoblast answered 12/9, 2017 at 15:23 Comment(0)
P
6

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>
Pich answered 13/9, 2017 at 3:34 Comment(0)
C
4

You can apply the background helper

<body class="has-background-grey-lighter"></body>
Creak answered 20/6, 2021 at 21:31 Comment(0)
C
3

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/

Counterattack answered 14/3, 2020 at 13:42 Comment(0)
P
3

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>
Purapurblind answered 21/7, 2021 at 10:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.