Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang=en>
- <head>
- <title>Responsive</title>
- <meta charset=utf-8>
- <meta name="viewport" content="width=device-width">
- <style>
- header {
- position:absolute;
- width:100%;
- }
- h1 {
- font-size:40px;
- color:white;
- text-align:center;
- font-family:courier new;
- }
- #box {
- padding:5px;
- position:absolute;
- top:50%;
- left:50%;
- transform:translate(-50%,-50%);
- width:60%;
- height:500px;
- border:5px solid red;
- }
- img {
- width:100%;
- height:100%;
- }
- </style>
- </head>
- <body>
- <div id='box'>
- <header><h1>Taco with Lime</h1></header>
- <img src='https://images.pexels.com/photos/461198/pexels-photo-461198.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940' title='Taco'/>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement