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
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
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>
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.