user2985669
user2985669

Reputation: 5

List style type only when hovering over list item.

How can I make the list-style-type: square; only appear when I hover over one of the list items?

To be clear I want list-style-type: none; unless I'm hovering over one of the list items.

Upvotes: 0

Views: 1812

Answers (3)

CRABOLO
CRABOLO

Reputation: 8793

you could try

li { list-style-type: none; }
li:hover { list-style-type: square; }

Upvotes: 0

DonCallisto
DonCallisto

Reputation: 29912

Use

    li{
        list-style-type:none;
    }
    li:hover{
        list-style-type:square;
    }

Upvotes: 0

SW4
SW4

Reputation: 71150

FIDDLE

HTML

<ul>
    <li>Item</li>
</ul>

CSS

li{
    list-style-type:none;
}
li:hover{
    list-style-type:square;
}

Upvotes: 1

Related Questions