Search
Other Articles Anywhere questions
Forum

Font Size not preserved in Articles Title Listing

Tim Hewitt's Avatar Tim Hewitt
Using the Category Listing option to list linked article titles, if I change the font size in the editor, it does not apply beyond the first title displayed.

{articles category="Golf"}[link]-[title][/link]
{/articles}

Here's the code that gets generated. As you can see the <span... changes the font-size to 14 as I selected in the editor, however the next title takes the default as the <span... is not applied.


<p>
<span style="font-size: 14px;">
<a href="/index.php/merchandise-services/golf/should-these-balls-be-illegal">-Should these balls be illegal?</a>
</span>
<br>
<a href="/index.php/merchandise-services/golf/the-golf-clinic-instant-access">-The Golf Clinic - Instant Access</a>
<br>
</p>
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give the original html code?
So the HTML in your editor containing the {articles} tags.
Please post a rating at the Joomla! Extensions Directory
Tim Hewitt's Avatar Tim Hewitt
<p><span style="font-size: 14px;">{articles category="Golf"}[link]-[title][/link]</span><br /><span style="font-size: 14px;">{/articles}</span></p>
<p> </p>

This actually looks like it would work, but it's not what's finally rendered in the module. What I posted above was from a view source on the rendered page.
Peter van Westen's Avatar Peter van Westen ADMIN
No, that is incorrect.
Try this:
<p>
{articles category="Golf"}<span style="font-size: 14px;">[link]-[title][/link]</span><br />
{/articles}
</p>
Also it is better to not use inline styling, but rely on classnames. Then use your custom CSS to style things how you want.
For instance:
<div class="my-article-list">
{articles category="Golf"}[link]-[title][/link]<br />
{/articles}
</div>
Then in your CSS simply so:
.my-article-list {
   font-size: 14px;
}
Please post a rating at the Joomla! Extensions Directory
Tim Hewitt's Avatar Tim Hewitt
All I did to generate the initial code was to use the editor and change the font size for the Title text. I did not look to see what it did to the actual code in the module.


I won't do that in the future without looking to see what code was created.

Thank you. This works perfectly now.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription