These changes will look as follows in our style rule:
- input[type=text] {
- width: 260px;
- padding: 5px;
- padding-right: 40px;
- outline: none;
- border: 2px solid #999999;
- border-radius: 5px;
- background-color: #FBFBFB;
- font-family: Cambria, Cochin, Georgia, serif;
- font-size: 16px;
- background-position: 270px -10px;
- background-image: url(‘/images/search.png’);
- background-repeat: no-repeat;
- }
Once you have made these two changes, you’ll find that the text no longer extends to the background image: