Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Current »

Keep button text separate from button images

If you're using a background image to make a <div> look like a button, place the text in the <div>, not in the image.

CSS

HTML

.update-button {
    background-image: url('images/button-bg.png');
    background-size: contain;
}
<div class="update-button">Update</div>
  • No labels