JavaScript same height images with flexbox same height images css,same height images bootstrap,same height

I'm trying to have same size images with flexbox. I give a display: flex; to my slick-track container and then flex: 1 0 auto to my img. I thought that with a flex-grow of 1 my image will increase if they are too small but it didn't happen.

the codepen here

$(".image-carousel").slick({
    // autoplay: true,
    dots: true,
	slidesToShow:3,
	
});
.slick-track {
  display: flex;
}
.slick-track .slick-slide img {
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
}
<div class="image-carousel">
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/gene-300x168.jpg" alt="noo">
      <figcaption class="elementor-image-carousel-caption">gene</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/chimie-300x225.jpeg" alt="chimie">
      <figcaption class="elementor-image-carousel-caption">chimie</figcaption>
    </figure>
  </div>
  <div class="slick-slide ">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/cerveau-300x180.jpg" alt="cerveau">
      <figcaption class="elementor-image-carousel-caption">cerveau</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/cropped-Science-300x300.jpg" alt="mpo">
      <figcaption class="elementor-image-carousel-caption">cropped-Science.jpg</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/ordi-300x169.jpg" alt="pôo">
      <figcaption class="elementor-image-carousel-caption">ordi</figcaption>
    </figure>
  </div>
  <div class="slick-slide ">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/astro-300x188.jpg" alt="captiopn 1">
      <figcaption class="elementor-image-carousel-caption">astro</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/Einstein-300x169.jpg" alt="roo">
      <figcaption class="elementor-image-carousel-caption">Einstein</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/gene-300x168.jpg" alt="noo">
      <figcaption class="elementor-image-carousel-caption">gene</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/chimie-300x225.jpeg" alt="chimie">
    <figcaption class="elementor-image-carousel-caption">chimie</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/cerveau-300x180.jpg" alt="cerveau">
      <figcaption class="elementor-image-carousel-caption">cerveau</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/cropped-Science-300x300.jpg" alt="mpo">
      <figcaption class="elementor-image-carousel-caption">cropped-Science.jpg</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/ordi-300x169.jpg" alt="pôo">
      <figcaption class="elementor-image-carousel-caption">ordi</figcaption>
    </figure>
  </div>
  <div class="slick-slide">
    <figure class="slick-slide-inner">
      <img class="slick-slide-image" src="http://parnasse.ovh/wp-content/uploads/2015/12/astro-300x188.jpg" alt="captiopn 1">
      <figcaption class="elementor-image-carousel-caption">astro</figcaption>
    </figure>
  </div>
</div>
Answer:1

Keep in mind that flex properties only work between parent and child.

You have display: flex on .slick-track. This means that the flex equal height feature (align-items: stretch) will apply to the child elements (.slick-slide).

And these child elements (flex items) are indeed equal height – once you remove the height: 100% on them, which overrides the equal height feature.

revised codepen

Your img elements are descendants of the flex container, but not children, so they don't recognize flex properties. You'll need to make each parent a flex container for the images to be full-height.

revised codepen

Answer:2

Here's another option, maintaining proportion and centering each image within the slide. This is probably as good as it gets unless you use background-image, which is more flexible when it comes to fitting inside of a container.

https://codepen.io/anon/pen/pRLXxz

Answer:3

On this page here. It's possible to see that the Facebook login button is initially disabled. (Using [disabled]="myProperty") Once an API request /facebooklogin/isnewuser returns, it is enabled. ...

On this page here. It's possible to see that the Facebook login button is initially disabled. (Using [disabled]="myProperty") Once an API request /facebooklogin/isnewuser returns, it is enabled. ...

I am trying to create a game for fun in Captivate. The game will mimic a wheel of fortune or spin the wheel format. I am trying to put a different spin on it, and not have any repeating numbers. ...

I am trying to create a game for fun in Captivate. The game will mimic a wheel of fortune or spin the wheel format. I am trying to put a different spin on it, and not have any repeating numbers. ...

  1. javascript captivate 2017
  2. captivate javascript commands
  3. captivate javascript examples
  4. captivate javascript change state
  5. captivate javascript api
  6. captivate javascript jump to slide
  7. captivate javascript variables
  8. captivate javascript functions
  9. captivate javascript go to next slide
  10. captivate javascript show hide
  11. captivate javascript interface
  12. captivate javascript alert
  13. captivate javascript advanced actions
  14. captivate javascript library
  15. captivate javascript go to slide
  16. captivate javascript play video
  17. captivate javascript next slide
  18. captivate javascript reset quiz
  19. captivate javascript pause
  20. captivate javascript close window

I'm trying to create a number field (.item_adults) that multiply it self and print the value into a class="item_price". To do that I create some of this: <div class="bookSection"> <input ...

I'm trying to create a number field (.item_adults) that multiply it self and print the value into a class="item_price". To do that I create some of this: <div class="bookSection"> <input ...

In javascript can we check nth character is a number using regular expressions without just using if conditions?

In javascript can we check nth character is a number using regular expressions without just using if conditions?

  1. check char string java
  2. check char string javascript
  3. check char string python
  4. check string char c++
  5. char check string
  6. check char in string php
  7. check char in string js
  8. check char in string jquery
  9. check char in string sql
  10. check if char string is empty
  11. check char in string bash
  12. check last char string c#
  13. check char in string swift
  14. check char in string vba
  15. check char in string vb.net
  16. check char in string delphi
  17. check char in string matlab
  18. check char in string online
  19. check char in string oracle
  20. check char empty string