0
Welcome Guest! Login
0 items Join Now

SOLVED CSS for three (responsive) images

  • SOLVED CSS for three (responsive) images

    Posted 8 years 4 months ago
    • Hi,

      I'm trying to put three images next to each other inside an article.

      The images are larger than the g-blocks where they are put in.

      I'm using the code below:

      <div class="g-grid">
      	<div class="g-block center size-33-3">
      		<div class="g-content">
      			<figure><img src="http://placehold.it/550x413" alt="" />
      				<figcaption>Bildunterschrift</figcaption>
      			</figure>
      		</div>
      	</div>
      	<div class="g-block center size-33-3">
      		<div class="g-content">
      			<figure><img src="http://placehold.it/550x413" alt="" />
      				<figcaption>Bildunterschrift</figcaption>
      			</figure>
      		</div>
      	</div>
      	<div class="g-block center size-33-3">
      		<div class="g-content">
      			<figure><img src="http://placehold.it/550x413" alt="" />
      				<figcaption>Bildunterschrift</figcaption>
      			</figure>
      		</div>
      	</div>
      </div>

      Why isn't the content of the g-blocks responsive and the images get resized?

      Where is my css mistake?

      Thanks in advance
      Björn Hallier
    • Last Edit: 8 years 4 months ago by Björn Hallier. Reason: Solved
    • DanG's Avatar
    • DanG
    • Preeminent Rocketeer
    • Posts: 36750
    • Thanks: 3229
    • Custom work done

    Re: SOLVED CSS for three (responsive) images

    Posted 8 years 4 months ago
    • If this is a site that is online (just installed, dev or live) could you please supply a link in the Public or SECURE part of your reply so we can better diagnose the issue?
      It makes our suggestions more accurate if we see the actual coding of your site.
  • Re: SOLVED CSS for three (responsive) images

    Posted 8 years 4 months ago
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED CSS for three (responsive) images

    Posted 8 years 4 months ago
  • Re: SOLVED CSS for three (responsive) images

    Posted 8 years 4 months ago
    • Now the images are resized, however the blocks floated to the right:
      Testartikel


      This image is hidden for guests.
      Please log in or register to see it.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED CSS for three (responsive) images

    Posted 8 years 4 months ago
    • try this instead
      .g-content figure {
        	table-layout: fixed;
        	max-width: 100%;
        	width: 100%;
      	margin-left: auto;
      	margin-right: auto;
      }
    • The following users have thanked you: Björn Hallier

  • Re: SOLVED CSS for three (responsive) images

    Posted 8 years 4 months ago
    • That was it! Thanks a lot!

      However it's not a Firefox bug since MS Edge had the same problems!
    • Last Edit: 8 years 4 months ago by Björn Hallier.
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED CSS for three (responsive) images

    Posted 8 years 4 months ago
    • well Safari and Chrome showed OK ...

Time to create page: 0.041 seconds