Page 1 of 1

Add space between each news entry

Posted: Mon Apr 16, 2007 2:24 pm
by duplay
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]

Re: Add space between each news entry

Posted: Mon Apr 16, 2007 2:35 pm
by RonnyK
DJM,

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>
The 3 used CSS-entries:

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;
}

You can see how this looks at www.terspille.nl where I have embedded the news on the home-page.

Ronny

Re: Add space between each news entry

Posted: Mon Apr 16, 2007 4:00 pm
by duplay
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

Posted: Mon Apr 16, 2007 4:17 pm
by Dr.CSS
You could add
before {/foreach} in the code or .NewsSummary {margin-bottom: 5px} to the CSS...