John
John

Reputation: 6622

Show div inside other div on hover

I have a div "actions" inside a div which is hidden by default. I want it to show when the mouse hovers over the div. How can I do this?

<div class="tile">
  <div class="actions">hello</div>
</div>

Upvotes: 1

Views: 79

Answers (2)

Prakash R
Prakash R

Reputation: 409

Handle it by css

.tile:hover .actions{
display:block;
}

Upvotes: 1

thomasstephn
thomasstephn

Reputation: 3835

Use CSS:

.tile:hover > .actions {
  display:block;
}

See this fiddle

Upvotes: 4

Related Questions