*

bobyrou

  • ****
  • 112 posts
Custom fields listed in two columns
« on: February 09, 2025, 08:01:55 PM »
I was looking for custom fields to be listed in two columns on listing page, but I see neither osclass or gamma theme has this feature so I thought to share with you how to customise this.

You just need to copy and then paste below css code into Appearance > Customization:



CSS Code:
Code: [Select]
.custom-fields .list {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Two equal columns */
  gap: 4px; /* Space between cells */
  width: 100%;
}

.custom-fields .field {
  display: flex;
  background: #e3e3e3; /* Light grey background */
  color: #000; /* Black text */
  padding: 2px 8px; /* Cell padding */
  border: 0px solid #e3e3e3; /* Cell border */
}

.custom-fields .field .name {
  font-weight: bold;
  margin-right: 5px;
  flex: 1; /* Allows even spacing */
}

.custom-fields .field .value {
  flex: 1;
}
.custom-fields .field, .job-detail table tr, .real-detail table tr, .car-detail table tr, .real-detail .detail2, #atr-item li, #atr-item li.atr-type-checkbox, #atr-item li.atr-type-select {float:left;clear:both;width:100%;padding:6px 0px;background:#e3e3e3;margin:0;list-style-type: disc; display: list-item;}
« Last Edit: February 09, 2025, 08:03:26 PM by bobyrou »

*

MB Themes

Re: Custom fields listed in two columns
« Reply #1 on: February 10, 2025, 09:19:16 AM »
Thanks for sharing ;)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots