A
A
Alexander Ruzhevich2016-03-21 18:23:02
css
Alexander Ruzhevich, 2016-03-21 18:23:02

How to make negative margin in Safari?

Good day, who will tell you how to make a negative margin in Safari?

<div class="row for_thumb_cat">
            
              <?php if ( has_post_thumbnail()) {the_post_thumbnail('full',array("class"=>"thumb_cat"));} ?> 
            
            </div>

.for_thumb_cat {

height:140px;
overflow:hidden;
}

.for_thumb_cat img:hover {
margin-top: -190px;

}

there is a block in which a thumbnail is displayed, when hovering the image with a negative margin, it moves up. but this option does not work in Safari, the image does not go up, but down, as if it had not a negative indent, but a positive one. if you remove the hover then Safari understands the negative margin. as soon as I add it does not work as it should

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question