# How to align height of linkedin posts

**URL:** <https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436>\
**Category:** Customization\
**Tags:** linkedin-feed\
**Created:** [May 27, 2024, 6:44am UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436 "2024-05-27T06:44:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamil\_Kucharski](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/kamil_kucharski/32/7586_2.png) [@Kamil\_Kucharski](https://community.elfsight.com/u/Kamil_Kucharski)\
**Post date:** [May 27, 2024, 6:44am UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436/1 "2024-05-27T06:44:25Z")

</div>

- **Issue description:**  
I would like to align height of my posts on linkedin feed carousel, almost each post is with different height, how is it possible to make them the same height and set it by CSS or JavaScript?

What I got so far is:

```auto
[class*="swiper-slide"]{
  height: 100% !important;
}

[class*="CarouselItem"]{
  height: 100%;
}

[class*="CarouselItem"] > div {
  height: 100%;
}

[class*="CardLayout__Container"]{
  height: 100%;
}

```

It looks good on the preview mode but linkedIn plugin disapear on my website. I can see only bottom dots and arrows to slide without linkedin posts tiles

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [May 27, 2024, 11:09am UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436/3 "2024-05-27T11:09:24Z")

</div>

Happy to see you on our forum @Kamil_Kucharski 👋

I’ve shared your request with the devs and will get back to you a bit later 😉

---

<div class="post-metadata">

**Author:** ![Kamil\_Kucharski](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/kamil_kucharski/32/7586_2.png) [@Kamil\_Kucharski](https://community.elfsight.com/u/Kamil_Kucharski)\
**Post date:** [May 27, 2024, 12:40pm UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436/4 "2024-05-27T12:40:24Z")

</div>

I think I kinda figured it out, it works better, post tiles are aligned but content isn’t exactyl, it depends if is it a image or link in post

```auto
[class*="Main__Inner"] {
  height: 400px !important;
}

[class*="swiper-slide"]{
  height: 400px !important;
}

[class*="CarouselItem"]{
  height: 100%;
}

[class*="CarouselItem"] > div {
  height: 100%;
}

[class*="CardLayout__Container"]{
  height: 100%;
}

[class*="CardLayout __Block-sc-v8bjlj-0 CardLayout__ RegularBlock-sc-v8bjlj-1 fQkzxc CardActionsBlock__CardLayoutBlock-sc-qzuptx-1 kDEeCy"]{
  display: flex !important;
  margin-top: 10px !important;
  flex: 1;
  padding-bottom: 8px !important;
  align-items: flex-end;
}

[class*="CardLayout __Block-sc-v8bjlj-0 CardLayout__ RegularBlock-sc-v8bjlj-1 fQkzxc CardActionsBlock__CardLayoutBlock-sc-qzuptx-1 kDEeCy"]{
  height: 100%;
}

[class*="MediaContainer__Container"]{
  height: 100%;
}

[class*="CardLayout __Block-sc-v8bjlj-0 CardLayout__ RegularBlock-sc-v8bjlj-1 fPCkvm"]::after{
  content: '';
  display: block;
  height: 80px;
}

```

Any extra tips to improve it are still welcome

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [May 27, 2024, 1:44pm UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436/5 "2024-05-27T13:44:54Z")

</div>

I’ve talked to the devs and they’ll try to customize the widget for you. I’ll let you know once the solution is provided 🙂

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [May 28, 2024, 7:24am UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436/6 "2024-05-28T07:24:50Z")

</div>

@Kamil_Kucharski Thank you for waiting!

Our devs provided me with this code for your use case:

```auto
global-styles,
.swiper-slide,
.es-carousel-layout-item,
.es-carousel-layout-item > div,
[class*="CardLayout__Container-sc"] {
  min-height: 400px;
}

[class*="CardContainer-sc"] div:nth-child(2) {
  flex: 1;
  align-items: flex-start;
}

```

  

Please check it out and let me know if you like what you see 🙂

---

<div class="post-metadata">

**Author:** ![Kamil\_Kucharski](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/kamil_kucharski/32/7586_2.png) [@Kamil\_Kucharski](https://community.elfsight.com/u/Kamil_Kucharski)\
**Post date:** [July 4, 2024, 10:52am UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436/7 "2024-07-04T10:52:57Z")

</div>

Sorry for late respond, my solution was kinda good but when new type of post came for example with attached shared link it doesn’t work, also code you provided is not working, height of posts isn’t the same

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [July 4, 2024, 12:55pm UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436/8 "2024-07-04T12:55:21Z")

</div>

Hi there @Kamil_Kucharski 👋

Please try to use this code instead:

```auto
global-styles,
.swiper-slide,
.es-carousel-layout-item,
.es-carousel-layout-item > div,
[class*="CardContainer-sc"] {
  min-height: 400px;
}

[class*="CardContainer-sc"] div:nth-child(2) {
  flex: 1;
  align-items: flex-start;
}

```

---

<div class="post-metadata">

**Author:** ![Kamil\_Kucharski](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/kamil_kucharski/32/7586_2.png) [@Kamil\_Kucharski](https://community.elfsight.com/u/Kamil_Kucharski)\
**Post date:** [July 8, 2024, 8:10am UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436/9 "2024-07-08T08:10:38Z")

</div>

It’s still not helping 😕

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [July 8, 2024, 10:31am UTC](https://community.elfsight.com/t/how-to-align-height-of-linkedin-posts/54436/10 "2024-07-08T10:31:14Z")

</div>

@Kamil_Kucharski I see that currently that code isn’t saved in the widget. I’ve double-checked it and it’s working fine:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/elfsight/original/3X/6/f/6f8fddc41d0ae898219dede871214b0e5b0b7868.png)

  

Could you please test it out once again?
