How to show/hide delete button with CSS?

Tags: css

Problem :

<div class="container">
    <div class="Xbutton">

.Xbutton { display:none; }
.Xbutton:hover { display:inline-block; }

How can I set "display:inline-block" to "Xbutton" when someone hovers "container" in CSS only?

Solution :


<div class="container">
    <div class="Xbutton">

.Xbutton { display:none; }
.container:hover .Xbutton { display:inline-block; }

This solution will not work in IE6, and might be buggy in IE7.

    CSS Howto..

    css - how to change image source by its id?

    How to get text in css to appear in the vertical middle

    How to add css to dynamic div Id

    How to put all of the images from folder into CSS box

    Difference in css position IE/FF, how to solv my problem?

    How do I change the admin header color in Magento?

    How to make text labels stick next to an image in CSS?

    How to only have margin between child and not with parent in CSS?

    Extra margin showing below element?

    How to use the Xpath and CSS selector in for function

    CSS How to display an image in the size of a / text line

    How to change color of the selected item from a Xul listbox?

    How to make textareas auto-resize using just CSS?

    How to stop Visual Studio css intellisense breaking when css is added via a custom control

    how to do external scripting?

    how to remove the last li::after for first line in specific width of an div

    How to avoid an unknown height sticky footer to overlap content with CSS only?

    CSS and Javascript too tightly coupled (CSS is not just presentation but is used by UI and JS), how to improve this?

    How to pass a Rails variable into a view's CSS that must be refreshed dynamically (every 60 seconds)?

    How to Create 3 Column Layout with CSS Only?

    How to base the height of a

    on whether or not its parent div has an image

    How can I create button using pure CSS which involves linear gradients and background color

    jQuery, given a Variable with DIV with items, how to scroll an Item to the Left

    How to use jQuery to select a class name that's transformed by css-loader?

    how to make header title with buttons

    How to fix redefinition warnings from CSS Validator?

    How to set the width of background-color of a div?

    How can I show hidden element when it has focus?

    CSS / jQuery: How to prevent tooltip from disappearing behind border of main wrapper (working code)

    How can I translate with webkit-transform enough so that