I would like to have a space automatically added between each NEWS entries that are placed on my site (see screenshot) Currently no space is set to separate entries. below is news code:
{foreach from=$items item=entry}
{$entry->titlelink}
{if $entry->formatpostdate}
{$entry->formatpostdate}
{/if}
{if $entry->author}
{/if}
{if $entry->summary}
{eval var=$entry->summary}
{else if $entry->content}
{eval var=$entry->content}
{/if}
{/foreach}
[gelöscht durch Administrator]
Add space between each news entry
Re: Add space between each news entry
DJM,
I call the logic with the same containers as for the Guestbook
The 3 used CSS-entries:
You can see how this looks at www.terspille.nl where I have embedded the news on the home-page.
Ronny
I call the logic with the same containers as for the Guestbook
Code: Select all
<div class="cms-guestbook-entry">
<div class="cms-guestbook-entry-header"><span class="cms-guestbook-entry-sendername">Laatste Nieuws</span> </div>
<p>{news category="general" number=5 detailpage="nieuws" dateformat="%d-%m-%Y"}</p>
</div>
Code: Select all
/* Style each entry */
.cms-guestbook-entry
{
border: 2px solid #000080; /*RK: was 1px en #069*/
margin-bottom: 0.2em;
background: #ffffff; /*RK: was 99B3E5*/
padding: 0 1em; /*RK: added line*/
}
/* Style the message header */
.cms-guestbook-entry-header
{
background: #000080;
color: white;
border: 1px solid black;
margin: 2px;
TEXT-ALIGN: center; /*RK: added line to center header*/
}
/* Style the sender name */
.cms-guestbook-entry-sendername
{
font-size: 1.2em;
font-weight: bold;
}
Ronny
Re: Add space between each news entry
Nice site, but I have done this before, but cant remember. I need to just add a "space" in the code I included above. Any ideas?
Re: Add space between each news entry
You could add
before {/foreach} in the code or .NewsSummary {margin-bottom: 5px} to the CSS...
before {/foreach} in the code or .NewsSummary {margin-bottom: 5px} to the CSS...