HTML CSS examples for CSS Property:background-color
absolute means object will be relative to the next parent element with relative (or absolute) positioning
<html lang="en"> <head> <style> html, body { margin: 0; padding: 0; height: 100%; overflow: auto; background-image: linear-gradient(137deg, red 0%, blue 27%, black 52%, pink 73%, yellow 100%); } .about {<!-- ww w. j a v a 2 s .c o m--> padding-top: 7%; position: relative; } .about .description { margin-left: auto; margin-right: auto; } .about .title { margin-left: auto; margin-right: auto; text-align: center; } .aboutImage { position: absolute; } </style> </head> <body translate="no"> <div class="section about"> <div class="title"> this is a test </div> <p class="description"> this is a test. this is a test</p> <img class="aboutImage" src="https://www.java2s.com/style/demo/Opera.png" alt="Team Photo" width="600"> </div> </body> </html>