WebsiteBaker Support (2.8.x) > Templates, Menus & Design

ShowMenu2: Adding a flag next to the menu

(1/2) > >>

svsanchez:
Hello!

I'm trying to add a small flag next to the showmenu2 on a responsive so that users can change the language they see the site. So far all my efforts have been in vain and the flag is placed below the showmenu2 or I'm forced to place it on top which doesn't look good. This is a picture of what I would like to achieve:

dbs:
Hi, a link to the page could help to help.

svsanchez:
Hi there dbs, here's the link to the test page: http://granelsa.com/pages/oculto-02.php

As you can see the flags (banderita1.jpg and banderita2.jpg) are being placed under the menu instead of to the right of it.

Here's the portion of code that I have close to the showmenu2:


--- Code: ---<div id="nav" class="clearfix">

<font face="Verdana" size="3">
<?php show_menu2(0, SM2_ROOT, SM2_ALL, SM2_ALL, false, "\n</li>", false, false, false, '<ul id="header_menu" class="menu desktop-menu">'); ?>
</font>
<img border="0" src="http://www.granelsa.com/images/banderita1.jpg" width="24" height="15">&nbsp;&nbsp;
<img border="0" src="http://www.granelsa.com/images/banderita2.jpg" width="24" height="15">
</div>
--- End code ---

Ruud:
Begin to make your menu floating.


--- Code: ---#header_menu { float: left; }
--- End code ---

Put the flags in their own <div> to position them.
Style the new div with:


--- Code: ---display: inline-block;
margin: 40px 0 0 10px;
--- End code ---

One tip:

the <font> tag is not supported in html5. Set the font using css in the #header_menu selector.

Roych:
For the icon with link in front of the menu I used this. (code acording to my menu)



--- Code: ---


<?php
show_menu2(
        $aMenu          = 0,
        $aStart         = SM2_ROOT+1,
        $aMaxLevel      = SM2_ALL,
        $aOptions       = SM2_ALL|SM2_PRETTY,
        $aItemOpen      = '<li class="[class] [if(class==menu-current){active}] [if(class==menu-expand){sub-menu}]">[a][menu_title]</a>',
        $aItemClose     = '</li>',
        $aMenuOpen      = '<ul>',
        $aMenuClose     = '</ul>',
        $aTopItemOpen   = false,
        $aTopMenuOpen   = '<ul id="navigation"><li class="home-button current-menu-item">
<a href="http://www.mydomain.com"><i class="fa fa-home"></i></a>'
    ); ?>

--- End code ---


Maybe somehow helps ;)


R

Navigation

[0] Message Index

[#] Next page

Go to full version