-1

as you can see in the following image, I want to put an image on the div of my slider and that image is resized responsively and does not change position at the bottom.

Image over div

the image it's <div class="img-top">

   <section id="hero-section">  
        <div class="hero-wrapper">                      
            <div class="grid-x grid-padding-x">
                <div class="cell small-12 medium-12 large-6 full-height">

                    <div class="img-top">
                        <img src="https://localhost/app/uploads/2021/05/goku_img.png">
                    </div> 
                            
                    <div class="hero-inner">
                        <?php echo do_shortcode(get_field("section_1_left"));?>
                    </div>                              
                 </div><!-- .cell -->

                <div class="cell small-12 medium-12 large-6 full-height section1right">
                    <div class="hero-inner-right">
                        <?php echo do_shortcode(get_field("section_1_right"));?>
                    </div>                          
                </div><!-- .cell -->

            </div>
        </div>
    </section><!-- #hero-section -->

I don't have css, not have a idea. Thank you for you help

nashCode
  • 73
  • 1
  • 14
  • 1
    What have you tried so far? – caiovisk May 13 '21 at 03:54
  • @caiovisk #hero-section{position:absolute;} amd .img-top{ position:relative} – nashCode May 13 '21 at 14:15
  • 1
    You are on the way, see CSS positioning docs: https://www.w3schools.com/css/css_positioning.asp . So, `#hero-section` should be relative and `.img-top` absolute. then you can position as you wish... To help you better, please provide us a minimal working example, see: https://stackoverflow.com/help/minimal-reproducible-example ... we won't code for you – caiovisk May 14 '21 at 01:34

1 Answers1

0

Solved issue by adding:

#hero-section {
   position: relative;
}
#hero-section .img-top img {
   position: absolute;
}
ulou
  • 5,542
  • 5
  • 37
  • 47
nashCode
  • 73
  • 1
  • 14