News formating

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
esperlu
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 29, 2011 6:35 pm

News formating

Post by esperlu »

Hi all,

I am using the default summary template and CSS for the news module and want to put the "[more]" link just next to the summary paragraph instead of below.

Code: Select all

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vestibulum sapien vel mi ultrices convallis. Curabitur mattis hendrerit augue sit amet vulputate. Praesent pretium sodales metus at semper. Etiam sed lectus id mi porta egestas. Donec interdum euismod luctus. Suspendisse quis justo arcu. [more]
Instead of

Code: Select all

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vestibulum sapien vel mi ultrices convallis. Curabitur mattis hendrerit augue sit amet vulputate. Praesent pretium sodales metus at semper. Etiam sed lectus id mi porta egestas. Donec interdum euismod luctus. Suspendisse quis justo arcu.

 [more]
I have tried to put display: inline in the ..NewsSummaryMorelink and ..NewsSummarySummary CSS classes to no avail. I have also tried to put the {$entry->morelink} variable inside the <div class="NewsSummarySummary"> with the same (bad)luck.

Any idea?
mike-r

Re: News formating

Post by mike-r »

esperlu wrote:I have tried to put display: inline
Why? You ned block, not inline.
esperlu
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 29, 2011 6:35 pm

Re: News formating

Post by esperlu »

Block type tag like <div> means a line return after the closing tag. That's why I went the dislpay: inline CSS route. The solution was easier than I thought. I just replaced the <div> tag (block tag) with a <span> (inline). That did the trick.

In the summary template I changed this:

Code: Select all

	<div class="NewsSummarySummary">
		{eval var=$entry->summary}
	</div>

	<div class="NewsSummaryMorelink">
		[{$entry->morelink}]
	</div>
By this:

Code: Select all

	<div class="NewsSummarySummary">
		{eval var=$entry->summary}
		<span class="NewsSummaryMorelink">
			[{$entry->morelink}]
		</span>
	</div>
Post Reply

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