Why this simple css queries does not change background color

I want to test the css queries (min-width & max-width) and I wrote this: <html> <head> <style> body{ background-color:red; } @media only screen and (max-width: 600px){ body{ backgroud-color:#F00; } } @media only screen and (max-width: 900px) and (min-width: 600px){ body{ backgroud-color:#FF0; } } @media only screen and (min-width: 900px){ body{ backgroud-color:#0F0; } } </style> </head>… Read More Why this simple css queries does not change background color

Change background colour with javascript with 2 colours

I’m trying to have a button on my webiste that if you press it the background color will change to blue which i have, but i’m trying to code that if you press it again it’ll change to white again. function myFunction() { document.body.style.backgroundColor= “lightblue”; } function my1Function() { document.body.style.backgroundColor= “lightgrey”; } function my2Function() {… Read More Change background colour with javascript with 2 colours

Put text on top div that is inside another div

I want to put the text over the div that is containing an image and that div is inside another div that also has an image. .marioHeader { background-image: url(“resources/marioBackground.jpg”); background-size: 600px; height: 500px; background-position: bottom; display: flex; justify-content: center; align-items: center; background-repeat: repeat-x; background-color: #6096ff; margin-top: 50px; text-align: center; } .title { text-align: center;… Read More Put text on top div that is inside another div

How to select the last paragraph element ONLY if no other elements follow after her? (CSS selector question)

How can I select the last paragraph <p> element, if and only its the last and lowest HTML element of the <article> element? I don’t want to use .classes or #id’s. A CSS selector should automatically find and select the <p> element. In my demo, in the first section, the last <p> element should be… Read More How to select the last paragraph element ONLY if no other elements follow after her? (CSS selector question)