Answer the question
In order to leave comments, you need to log in
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.
Answer the question
In order to leave comments, you need to log in
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.
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 questionAsk a Question
731 491 924 answers to any question