Neo127
Neo127

Reputation: 5

css i want to apply style to everything not just body

i want to apply my style to everything not just body

style.css :

body {
    background-color: #3F3F46;
    color: #ffffff;
    cursor: url('https://lelkasa.github.io/cursourcustom.png'), auto;
}

Upvotes: 0

Views: 41

Answers (2)

Antonio Petricca
Antonio Petricca

Reputation: 11006

Change the CSS into:

html {
    background-color: #3F3F46;
    color: #ffffff;
    cursor: url('https://lelkasa.github.io/cursourcustom.png'), auto;
}

Upvotes: 1

Jofbr
Jofbr

Reputation: 473

Replace body with html

html {
    background-color: #3F3F46;
    color: #ffffff;
    cursor: url('https://lelkasa.github.io/cursourcustom.png'), auto;
}

You can also use * because the * selector selects all elements.

* {
    background-color: #3F3F46;
    color: #ffffff;
    cursor: url('https://lelkasa.github.io/cursourcustom.png'), auto;
}

Upvotes: 3

Related Questions