Page 1 of 1

how to remove spaces in the news section.

Posted: Thu Feb 23, 2012 9:21 pm
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}

Re: how to remove spaces in the news section.

Posted: Thu Feb 23, 2012 9:28 pm
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.

Re: how to remove spaces in the news section.

Posted: Thu Feb 23, 2012 10:10 pm
by piphansdk
damn that was easy. thanks a lot :)

Re: how to remove spaces in the news section.

Posted: Thu Feb 23, 2012 10:16 pm
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

Re: how to remove spaces in the news section.

Posted: Thu Feb 23, 2012 11:29 pm
by Wishbone
You can put the button in your postSummary div, or add to your CSS:

Code: Select all

.button {
  margin-bottom: 20px;
}

Re: how to remove spaces in the news section.

Posted: Fri Feb 24, 2012 1:28 am
by applejack
In order for the margins to work use

display:block;

Re: how to remove spaces in the news section.

Posted: Fri Feb 24, 2012 2:22 am
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>

Re: how to remove spaces in the news section.

Posted: Fri Feb 24, 2012 5:48 pm
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...