L
L
Lemman2015-07-07 18:09:52
css
Lemman, 2015-07-07 18:09:52

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:
7649b7c634b511f9515ff8068d89a3a4.png
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>'; 
?>

Style code:
.taglist, .taglist * {
  margin:0;
  padding:0;
  list-style:none;
}
.taglist li {
  margin:5px;
  display:inline-block;
}

Upd. I changed the style a little myself - cut out the amount of materials, experimented with padding and margin.
Initially, the module displays tags in the form of a horizontal list with bullets, style is needed to get rid of this.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2015-07-07
@cyber-jet

Everything should work for you, margin in .taglist li {...} adjusts the horizontal distance.

A
Aigelov, 2015-07-08
@aigelov

The above code is working properly, add the html and css code here, exactly with the div where the tag cloud lies

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question