D
D
del9937882016-03-12 01:13:45
CMS
del993788, 2016-03-12 01:13:45

How to change the view of the latest news in dle?

Hello. My question is: how to change the view of the latest news in DLE. Look at the picture I provided. Those. the last news is big, the rest are small. If we add one more piece of news, then the first one will take the place of the second one, and the new latest news will appear in its place... It's chaotic, but, it seems, understandable.19f647f7d9c5403498d394e6c68bd776.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Goryachev, 2016-03-12
@del993788

The first solution is suitable if the news ID is known.
I had another implementation via :first-child (css).
All the news is in li, so for the first one, it was not a problem to apply individual properties.
Thus, always the first news, regardless of the ID will be with a unique design.

S
smirnovilya, 2016-11-13
@smirnovilya

Or use last-child for the latest news block in css and write separate styles for it.
The second option will increase the load on the database a little, but display the news using two queries. set for the first 4 news limit='4' from='1'
and when requesting a template for the last one limit='1' from='0'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question