Bootstrap: Resizing the figure

Asked

Viewed 45 times

0

I have the following HTML code:

<section class="container sobre-site">
    <h2 id="sobre-site-id" class="subtitulo">Título</h2>

    <figure class="thumbnail">
        <img class="img-loja" src="img/espaco/8-1.png" alt="Título">
        <figcaption class="caption">
            <p>
                Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
                tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim 
                veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea 
                commodo consequat. Duis aute irure dolor in reprehenderit in voluptate 
                velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
            </p>
        </figcaption>
    </figure>
</section>

The result for mobile is as follows:

inserir a descrição da imagem aqui

And the result for desktop looks like this:

inserir a descrição da imagem aqui

But I would like the result for the desktop to be as follows:

inserir a descrição da imagem aqui

I tried to do several ways but I’m finding that in boostrap there is no way to do so. Or has?

After applying the code:

@media(min-width: 1024px) {
    .img-loja, .caption  {
        float:left;
        width: 50%;
    }
}

was as follows:

inserir a descrição da imagem aqui

The border is not encompassing all content (image and text)

  • Now I’m on the phone, I can’t test but try with the text (p), margin: 0;

  • Miguel, I tested but it hasn’t changed either.

  • But at the bottom, I edited and now there’s no margin

  • Yeah, I tested it that way . caption p { margin: 0; } really, but it wasn’t. You tested yours and it worked?

  • Yes, you can see below, in the example I gave. I think there’s something in your css that triggers this, delete everything related to this and start with this example below

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.