محدد CSS لعمود آخر منشور في صفحة التصنيف؟

أحتاج إلى إزالة الحدود السفلية لعمود “أحدث المنشورات” في صفحة التصنيف الرئيسية.

الكود التالي لا يعمل:
div.latest-topic-list-item:last-child {border-bottom-style: none;}

لسبب ما، هذه هي القائمة الوحيدة غير المهيكلة كجدول، بل كـ DIVs فقط، مما يجعل تنسيقها باستخدام CSS أكثر صعوبة.

Instead of last-child (which it isn’t) try going backwards skipping one. eg.

#list-area .categories-and-latest .column .latest-topic-list .latest-topic-list-item:nth-last-child(2) {
background-color: #f00; } 

I imagine at least half of those selectors can be safely removed, but I’ll leave it to you to do the tweaking.

yes, it works! thank you so much @Mittineague.

.latest-topic-list-item:nth-last-child(2) {border-bottom-style: none;}

هل ما زال محدد .latest-topic-list متاحًا؟ أحاول حذف بعض المنشورات من الصفحة الرئيسية (عرض “الأحدث” فقط) باستخدام CSS (قصة طويلة)، لكنني واجهت صعوبة في العثور على محدد يمكنه استهداف الصفحة الرئيسية فقط.

هذا يعمل، لكنه يخفي المنشورات في العروض الأخرى أيضًا:

[data-topic-id="123"] {
    display: none;
}

شيء مثل هذا سيكون مثاليًا، لكنني لا أرى محدد .latest-topic-list (أو أي محدد فريد لعرض موضوعات “الأحدث”) في الصفحة:

.latest-topic-list [data-topic-id="123"] {
    display: none;
}