To learn more about CSS background properties, study our CSS Background Tutorial. Example of how to add background Image with no-repeat value - Online HTML editor can be used to write HTML and CSS code and see results. better: Tip: To repeat an image vertically, set background-repeat: repeat-y; Showing the background image only once is also specified by the background-repeat property: In the example above, the background image is placed in the same place as the text. Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. We can size it fit height by changing code as follows: /* This will size the . You can also prevent an image from repeating vetically, while allowing it to repeat horizontally (and vice versa). image painting area. First, we write element. Position the background image in the top-right corner: Get certifiedby completinga course today! What is the origin and basis of stare decisis? The first Of course, you'll only see this effect if the background image is smaller than its container. First, we write and tags are closed with and