1 reply [Last post]
wannabe
wannabe's picture
Offline
newbie
Last seen: 9 years 13 weeks ago
Timezone: GMT-7
Joined: 2009-04-20
Posts: 4
Points: 12

I know how to add something like an asterisk next to a label, but I cannot figure out how to put an image to the left of a label. Can someone show me how? It is to show a required field.

Old Code putting an asterisk next to a label:

<!--Markup-->
<div class="row">
	<label class="required">Incident Type</label>
</div>
 
/*CSS*/
.required:after 
{
    color: red;
    content: ' *';
}

I need to know how to put an image before the label instead.

Thank you

ttkim
ttkim's picture
Offline
newbie
Last seen: 9 years 19 weeks ago
Timezone: GMT-7
Joined: 2013-03-07
Posts: 10
Points: 13

Padding

You could do something like this:

.required
{
	background: url('image.jpg') no-repeat top left;
	padding-left: 20px;
}