# レコード一覧の列固定について

**URL:** <https://community.cybozu.dev/t/topic/4876>\
**Category:** kintone 開発相談\
**Created:** [2020 年 2 月 8 日午前 5:10 UTC](https://community.cybozu.dev/t/topic/4876 "2020-02-08T05:10:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Legacy\_Account1283](https://avatars.discourse-cdn.com/v4/letter/l/a6a055/32.png) [@Legacy\_Account1283](https://community.cybozu.dev/u/Legacy_Account1283)\
**Post date:** [2020 年 2 月 8 日午前 5:10 UTC](https://community.cybozu.dev/t/topic/4876/1 "2020-02-08T05:10:36Z")

</div>

お世話になっております。

レコード一覧で、横にスクロールしても、

左から5列目までを固定したい…という悩みを持っています。

&nbsp;

[https://developer.cybozu.io/hc/ja/community/posts/115017537323-%E3%83%AC%E3%82%B3%E3%83%BC%E3%83%89%E4%B8%80%E8%A6%A7%E3%81%AE%E5%9B%BA%E5%AE%9A%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6](https://community.cybozu.dev/hc/ja/community/posts/115017537323-%E3%83%AC%E3%82%B3%E3%83%BC%E3%83%89%E4%B8%80%E8%A6%A7%E3%81%AE%E5%9B%BA%E5%AE%9A%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6)

&nbsp;

の記事を見てやってはみましたが、ダメでした。

最新の方法を教えてください。

---

<div class="post-metadata">

**Author:** ![Legacy\_Account2678](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@Legacy\_Account2678](https://community.cybozu.dev/u/Legacy_Account2678)\
**Post date:** [2021 年 4 月 9 日午前 1:46 UTC](https://community.cybozu.dev/t/topic/4876/2 "2021-04-09T01:46:16Z")

</div>

下記CSSを試してみてください。

&nbsp;

```
.recordlist-row-gaia:nth-child(2n+1) > td {
background-color: #f5f5f5;
}
.recordlist-row-gaia>td,.recordlist-header-cell-gaia {
background-color: #fff;
}
.recordlist-row-gaia>td:nth-child(1),.recordlist-header-cell-gaia:nth-child(1){ position: sticky; left: 0px; width: 50px !important; }
.recordlist-row-gaia>td:nth-child(2),.recordlist-header-cell-gaia:nth-child(2){ position: sticky; left: 50px; width: 50px !important; }
.recordlist-row-gaia>td:nth-child(3),.recordlist-header-cell-gaia:nth-child(3){ position: sticky; left: 100px; width: 50px !important; }
.recordlist-row-gaia>td:nth-child(4),.recordlist-header-cell-gaia:nth-child(4){ position: sticky; left: 150px; width: 50px !important; }
.recordlist-row-gaia>td:nth-child(5),.recordlist-header-cell-gaia:nth-child(5){ position: sticky; left: 200px; width: 50px !important; }

.recordlist-header-cell-gaia:nth-child(1){ z-index:1; }
.recordlist-header-cell-gaia:nth-child(2){ z-index:1; }
.recordlist-header-cell-gaia:nth-child(3){ z-index:1; }
.recordlist-header-cell-gaia:nth-child(4){ z-index:1; }
.recordlist-header-cell-gaia:nth-child(5){ z-index:1; }

```
