List problem in PHP/CSS.

Hello. I have a problem with PHP, and/or css.

<?php foreach ($this->children() as $child) : ?> <?php echo $child->link($child->title, (in_array($child->slug, explode("/", $this->url)) ? ' class="menyhund"': null)); echo $child->content('bilde'); ?> <?php endforeach; ?>
[/php] This displays what i want, but it displays the elements in a list heading down. So it becomes a long list, i want the list to become more compact. Can you please help me?

This is the CSS of the div tag:

#test1 a { text-decoration: none; color: #fff; font-weight: bold; align:center; } #text1 p { align:center; font-size:large; }

The php code what you posted, not shows what HTML elements are outputted. But, assuming you have


, you can try to reduce margins/paddings in your css file like this:

#text1 p { align:center; font-size:large; margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 100%; }

Play with values of last 5 lines above to make your list look as you want.

Sponsor our Newsletter | Privacy Policy | Terms of Service