alignment of text and an image

1

Can anyone help me with text placement? I would like the text to be under the image when the resolution was that of a mobile device with the

asked by anonymous 27.06.2017 / 16:47

2 answers

1

With a simple Javascript we can have the expected result.

Just replace the line

<div class="produto_em_destaque" style="display: flex;width: 100%;">

by this javascript

<script>
    if (screen.width<540){
        document.write('<div>');
    }else{
        document.write('<div class="produto_em_destaque" style="display: flex;width: 100%;">');
                }
</script>
    
27.06.2017 / 18:31
0

Use Media Screen to use a specific CSS for the width you want. Example:

@media screen and (max-width: 540px) {
  img {
    display: block;
    width: 100%;
  }
  span {
    width: 100%;
  }
}

Remembering that the code must be below your CSS used in the desktop view.

Font

    
27.06.2017 / 17:57