Answer the question
In order to leave comments, you need to log in
How to reduce top indent in module for Joomla?
Guys, hello. Tell me what's the matter - there is a module that displays tags, there is its style, written in the style of the template. I can increase the indent between the module name and the content, but not decrease it. Himself a noob, but before asking, he tried to figure it out himself. Does not work.
Screenshot:
Module code:
<?php defined('_JEXEC') or die;
$query = 'select count(*) as kolvo,name from #__tag_term_content as tc inner join #__tag_term as t on t.id=tc.tid group by(tid) order by name';
$db = JFactory::getDBO();
$db->setQuery($query);
$terms= $db->loadObjectList();
echo '<ul class="taglist">';
foreach ($terms as $term) {
$term->link=JRoute::_('index.php?option=com_tag&task=tag&tag='.urlencode($term->name));
echo '<li>'.
'<a href="'.$term->link.'">'.
$term->name.
'</a>'.
'<span>Статей: '.
$term->kolvo.
'</span>'.
'</li>';
};
echo '</ul>';
?>
.taglist, .taglist * {
margin:0;
padding:0;
list-style:none;
}
.taglist li {
margin:5px;
display:inline-block;
}
Answer the question
In order to leave comments, you need to log in
Everything should work for you, margin in .taglist li {...} adjusts the horizontal distance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question