Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <style>
- .bg {
- /* for plain background */
- background: #FE82B624;
- /* vv for image background. remove if want plain */
- background-image:url(https://i.imgur.com/Wy0Pm6R.jpg);
- background-size:cover;
- padding:12px; /* make number bigger/smaller for a bigger/smaller border */
- border:1px solid black;
- width:fit-content;
- }
- .inner {
- background: #FFF;
- border:1px solid black;
- height:300px; /* change height of image */
- width:auto; /* change width of image */
- overflow-y:auto; /* remove overflow if you don't want a scroll */
- /* set height to "height:fit-content;" to expand with text size */
- }
- </style>
- <div class="bg">
- <img class="inner" src="https://i.imgur.com/uO0i2L4.png">
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement