how to remove spaces in the news section.

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
piphansdk
Forum Members
Forum Members
Posts: 30
Joined: Fri Jan 20, 2012 9:19 am

how to remove spaces in the news section.

Post by piphansdk »

Hello.

i would lie to remove the space, between each news topic. and make space after the "more button"
page: http://egmun.org/index.php?mact=News,cn ... eturnid=15

the cms news template:

{foreach from=$items item=entry}
<h5 class="newsSummarytitle"><a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape}</a></h5>
{if $entry->postdate}
<div class="postDate">{$entry->postdate|cms_date_format}
</div> {/if}
{if $entry->author}
<div class="postAuthor">{$entry->author}</div>
{/if}
<div class="clear"></div>
{if $entry->summary}
<div class="postSummary">{eval var=$entry->summary}
</div>
<div class="button grey small">{$entry->morelink}
<br>
</div> {else if $entry->content}

<div class="postSummary">{eval var=$entry->content}
</div> {/if} {if isset($entry->extra)}
<div class="NewsSummaryExtra"> {eval var=$entry->extra} {* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
</div> {/if} {if isset($entry->fields)} {foreach from=$entry->fields item='field'}
<div class="NewsSummaryField"> {if $field->type == 'file'}
<img src="{$entry->file_location}/{$field->value}"/> {else} {$field->name}:†{eval var=$field->value} {/if}
</div> {/foreach} {/if}
<div class="clear"></div>
{/foreach}
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: how to remove spaces in the news section.

Post by Wishbone »

You specified a fixed height of 120px in your stylesheet.

Code: Select all

.postSummary {
margin: 10px 0 10px 0;
height: 120px;
overflow: hidden;
}
remove the height, increase the bottom margin.
piphansdk
Forum Members
Forum Members
Posts: 30
Joined: Fri Jan 20, 2012 9:19 am

Re: how to remove spaces in the news section.

Post by piphansdk »

damn that was easy. thanks a lot :)
piphansdk
Forum Members
Forum Members
Posts: 30
Joined: Fri Jan 20, 2012 9:19 am

Re: how to remove spaces in the news section.

Post by piphansdk »

hmm i tryid to edit the px:
.postSummary {
margin: 10px 0 15px 0;
overflow: hidden;
but the 15 px is after txt but before the more box... have a look at the page again, and see what i mean.
i would like something about 20-25px after the gray button
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: how to remove spaces in the news section.

Post by Wishbone »

You can put the button in your postSummary div, or add to your CSS:

Code: Select all

.button {
  margin-bottom: 20px;
}
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: how to remove spaces in the news section.

Post by applejack »

In order for the margins to work use

display:block;
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: how to remove spaces in the news section.

Post by Wishbone »

The HTML element assigned class="button" is already a block element.

Code: Select all

<div class="button grey small">
  <a href="http://egmun.org/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=5&cntnt01origid=15&cntnt01returnid=15">More</a>
</div>
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: how to remove spaces in the news section.

Post by Dr.CSS »

The default News summary template wraps each news item in a div, if you had the same thing you could put padding or margin on it and push the news items away from each other at the bottom instead of trying to do it with the more button...
Post Reply

Return to “The Lounge”