style.css
setup.css
index.html
div { background-color: aquamarine; } aside { background: gold; } @media (hover: hover) { aside { visibility: hidden; } div:hover + aside { visibility: visible; } }
body { font-family: sans-serif; padding: 20px; } aside, div { padding: 10px; } aside, div:not(:first-child), p:not(:first-child) { margin-top: 10px; }
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="/assets/styles/reset.css" rel="stylesheet"> <link href="setup.css" rel="stylesheet"> <link href="style.css" rel="stylesheet"> </head> <body> <div> <p>This element is responsive. I’ll add some text here so we have something to look at and so that it wraps, but the text itself isn’t important, at the moment.</p> <p>Some more text in it. Again the text doesn’t really matter, I just want a bit of stuff in here. A few lines, is all.</p> </div> <aside>This is some really important text that you want to make sure mobile users can see, too!</aside> </body> </html>