The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Very New to CSS (basic question about background color)
Just learning started a few hours ago but i have got stuck
If i have my style sheet with this code
Shouldnt that make all my pages have that colour the background?
If i had the code to the html page itself it works but not if i add it to the style sheet. if i had font colour and so on to the style shee that works fine.
Thanks in advance.
It’s hard to tell but the code
certainly should work but it will only extend to the height of the content unless there is something else going on.
The body element is not the height of the viewport by default.
If it’s not working in the stylesheet then either you have a path error (the stylesheet isn’t linked right) or a syntax error and you should check your code.
i will look more in to it thanks