Jennifer Anthony
Jennifer Anthony

Reputation: 2277

style for tag `li`

I want put following check mark in side right tag <li>. How is it?

This check mark: enter image description here

Example: http://jsfiddle.net/HpVcy/

ul li{
padding: 3px 10px 3px 10px;
background:url(http://img4up.com/up2/73089745861375946127.png) no-report;    
}

Upvotes: 0

Views: 129

Answers (6)

Sotiris
Sotiris

Reputation: 40066

you can add
li { list-style-image: url("http://img4up.com/up2/73089745861375946127.png") }

Demo: http://jsfiddle.net/HpVcy/7/

More info: http://www.w3.org/TR/CSS21/generate.html#propdef-list-style-image

Upvotes: 2

Moin Zaman
Moin Zaman

Reputation: 25445

you have no-report in your css, it should be no-repeat

Upvotes: 1

Ryan
Ryan

Reputation: 28187

Change your background to:

background:url(http://img4up.com/up2/73089745861375946127.png) no-repeat right;    
                                                               ^^^^^^^^^^^^^^^^

and increase the padding on the right a bit, e.g.:

ul{
    float: right;
    text-align: right;
    direction: rtl;
    margin: 50px 50px 0 0;
}
ul li{
padding: 3px 20px 3px 10px;
background:url(http://img4up.com/up2/73089745861375946127.png) no-repeat right;    
}

Upvotes: 0

c-smile
c-smile

Reputation: 27460

Use no-repeat; instead of no-report;

Upvotes: 1

Mathias Schwarz
Mathias Schwarz

Reputation: 7197

list-style-image is what you are looking for:

ul li{
  padding: 3px 10px 3px 10px;
  background:url(http://img4up.com/up2/73089745861375946127.png) no-report;    
  list-style-image:url(https://i.sstatic.net/so5PA.png);
}

(you may want to delete the background url after adding the list-style-image)

Upvotes: 1

Syntax Error
Syntax Error

Reputation: 4527

Try this

ul li{
padding: 3px 15px 3px 10px;
background:url(http://img4up.com/up2/73089745861375946127.png) no-repeat right;    
}

Note: It's no-repeat, not no-report

Upvotes: 5

Related Questions