Adjusting 'Line spacing' in News Summary

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Adjusting 'Line spacing' in News Summary

Post by Darwin Web Design »

Hi there
I've set up the news section of my website and the summary which appears on the home page is coming along nicely.  I've worked out the stylesheet and the template to get the general 'look' I'm after.

At the moment it looks as follows:

Date
Title of News
(hard return/space)
The summary of news xxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxx.
(hard return/space)
[more] (with the link)

How can I get rid of the hard returns or those extra spaces as shown in brackets above?  My styles actually divide the info up visually by using bold and underline for the link, so I don't need the spaces as its adding too much space vertically.  I'd like each field to be grouped with no spaces at all (only between actual news stories). 

So basically I'd like to replace the hard returns with soft breaks but can't work out where to do this, template and css don't seem to be the place.

Many thanks for a hint or two...
???
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Re: Adjusting 'Line spacing' in News Summary

Post by Darwin Web Design »

Thank you very much for that.  I looked into it and it turned out that I had too many style sheets (I think).  I have my news summary floated to the right so I had a style for "news" my main css file, then ofcourse all of the additional news styles in the separate news style sheet made it all very confusing.

I actually found that only half of your styles worked for me and the hard spaces were still there.  In the end, as I couldn't work out how to fix it - I did not use any of the news styles at all and let it default to the rest of the page's main styling ie just the same colour links that the rest of the site uses etc.  I still controlled the size and colour of text in the "news" class though.  And I just used
tags where needed.

Code: Select all

<div class="news">
{foreach from=$items item=entry}

	<strong>{$entry->titlelink}</strong><br />
	{if $entry->summary}
	{eval var=$entry->summary}
			
	[{$entry->morelink}]<br /><br />
	{else if $entry->content}
	
	{eval var=$entry->content}
	{/if}
{/foreach}
</div>
It looks ok and the code isn't long so I stopped stressing and just left it as above.

Thanks  ;)
Post Reply

Return to “Layout and Design (CSS & HTML)”