HTML CSS examples for CSS Form:input button text
Responsive image with button and text
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .hero-image {<!-- w w w. j a v a 2 s . c o m--> background-image: url("https://www.java2s.com/style/demo/Firefox.png"); background-position: center; background-repeat: no-repeat; background-size: cover; padding: 50px; } .hero-text { position: relative; color: #154774; text-align:right; } .hero-text h1 { font-size:40px; margin-right:15%; } .hero-text h1 .italic { font-style: italic; } .hero-text button { border-radius: 5px; padding: 10px 20px; color: white; background-color: #00adee; text-align: center; cursor: pointer; font-size: 20px; font-weight: bold; bottom: 50px; max-width: 150px; margin-top: 25px; } .hero-text button:hover { background-color: #0597c4; color: white; } .herotext2 { position:relative; border-radius: 5px; padding: 10px 10px 10px 10px; color: white; background-color: red; font-size: 20px; width: 200px; line-height: 1.4; margin: 0 0 0 auto; text-align:left; } .herotext2 .no { font-size: 135px; line-height: 130px; font-weight: 600; } .herotext2 .tag { position: absolute; bottom: 26px; right: 30px; font-size: 12px; color: red; } </style> </head> <body> <div class="hero-image"> <div class="hero-text"> <h1> IT support for your <br> business - <span class="italic"> as easy as <br> child?s play </span> </h1> <p class="herotext2"> All inclusive IT GDPR service packages from <span class="no">?33</span> <span class="tag">p/m</span> </p> <button>Try it for free today</button> </div> </div> </body> </html>