Post by papino » Tue May 19, 2015 10:20 am

Opencart 2.0+. In the default language.tpl file, this piece of code below will display the languages vertically from the webpage.
<?php foreach ($languages as $language) { ?>
<li><a href="<?php echo $language['code']; ?>"><img src="image/flags/<?php echo $language['image']; ?>" alt="<?php echo $language['name']; ?>" title="<?php echo $language['name']; ?>" /> <?php echo $language['name']; ?></a></li>
<?php } ?>
However, I want the languages to be displayed horizontally,like it's showing on this website www.blackcow.cn. I don't know where I can make the change, and just tried to add css inline style to the <li> tag like <li style="display:inline">, that obviously didn't work.So, please help, thanks.

Newbie

Posts

Joined
Sun May 08, 2011 11:26 am

Post by papino » Tue May 19, 2015 11:28 am

I changed <li> to <span>, voila it worked!

Newbie

Posts

Joined
Sun May 08, 2011 11:26 am
Who is online

Users browsing this forum: No registered users and 8 guests