How to fit Mega SubMenu in the screen?

Memovie Joomla Template support forum for Joomla 1.5 only.
GK User
Thu Mar 04, 2010 9:49 pm
Hello,

is there a way to make the dropdown mega menu fit the visible screen?
hence covering all content below as it drops down (and not from absolute left to absolute right)

there's the option in
-Menu Item
---Parameters (extended)
-----Submenu Width

but this field seems to only process pixels, and not percentages!

is there any turn-around for this?

Regards
flora-organica.com team
User avatar
Expert Boarder

teitbite
Thu Mar 04, 2010 11:03 pm
Hi

Unfortunately You need to use px. But please look at the statistics http://www.w3schools.com/browsers/browsers_display.asp and try to count which value should fit the best for most users.
User avatar
Moderator

GK User
Fri Mar 05, 2010 1:33 pm
thanks teitbite for your reply :)

BUT
Assigning a fix width to the submenu will make usertools useless (i mean what's the point of resizing the screen when the menu can not be resized!)

AND
Since there's the following code in templates/gk_memovie/templateDetails.xml :
Code: Select all
<param name="gk_screen" type="list" default="982" label="Template Width" description="Choose between various width options. AUTO=This would be auto decided based on user resolution. Narrow Screen=782px  Wide Screen=982px  Specified Percentage=fluid  Specified Pixels=fix">

                        <option value="auto">AUTO</option>

                        <option value="782">Narrow Screen</option>

                        <option value="982">Wide Screen</option>

                        <option value="fluid">SPECIFIED PERCENTAGE</option>

                        <option value="fix">SPECIFIED PIXEL</option>

                        </param>


Is there no way to make a global variable that retrieves the corresponding screen width, so that we can apply it on the submenu width menu?

I mean, it is already used in the UserTools
(code source from: /templates/gk_memovie/layouts/blocks/usertools/tools.php)
(which allows users to manually increase/decrease font and/or choose the screen layout)
Code: Select all
<script type="text/javascript">var CurrentFontSize=parseInt('<?php echo $this->getParam(GK_TOOL_FONT);?>');</script>

   <a class="tools_btn" id="gk-tool-auto" onclick="switchTool('<?php echo $this->template."_".GK_TOOL_SCREEN;?>','auto');return false;">auto</a>

   


I am still a beginner in php,html and css, but i can assume 99% that it's this function:
Code: Select all
parseInt('<?php echo $this->getParam(GK_TOOL_FONT);?>')


Can we use it somewhere else?

Thanks again in advance

Regards,
flora-organica team
User avatar
Expert Boarder

teitbite
Sat Mar 06, 2010 9:55 pm
Hi

I've misunderstood You. I thought You are talking about setting height area of what Mega Menu will cover. If it's about width the menu should stretch till filling all screen. It depends on number of options in menu.
User avatar
Moderator

GK User
Sat Mar 06, 2010 10:18 pm
Hi

Try to add this code:

Code: Select all
#gk-subnav ul{
height: auto!important;
}
#gk-subnav {
display: block!important;
height: auto!important;
}


It should look like this:



Cheers ;)
User avatar
Platinum Boarder

GK User
Sun Mar 07, 2010 10:09 am
First, thanks for both of you :)

Second,
Seichinha, it seems the code you gave is to change the height
but i want to change the width (as teitbite said)

anyway, i did insert the code in gk-stuff.css
but it gave me NO difference
even updating the existing "height" fields gave no difference

i changed the word "height" to "width"
but it still gave no difference


thanks in advance
and Cheers!

flora-organica.com team
User avatar
Expert Boarder

GK User
Sun Mar 07, 2010 5:47 pm
i have one question about mega menu
http://wiki.joomlart.com/wiki/JA_Templa ... Navigation
how to show the info text on some submenu
like on the image
http://wiki.joomlart.com/images/4/48/Me ... olumns.png
User avatar
Senior Boarder

GK User
Sun Mar 07, 2010 7:01 pm
flora wrote:
...

anyway, i did insert the code in gk-stuff.css
but it gave me NO difference
even updating the existing "height" fields gave no difference
...


The code provided is only for Dropline style, not Mega Menu.
As i can see on your site, you are using Mega menu.
This really needs width px values.
User avatar
Platinum Boarder

GK User
Sun Mar 07, 2010 7:02 pm
i have one question about mega menu
wiki.joomlart.com/wiki/JA_Template_Framework/Navigation
how to show the info text on some submenu
like on the image
wiki.joomlart.com/images/4/48/Megamenu-u...ide-nice-columns.png


just like first level menus: in the area "Add description".
check this image for the field "Flexible but simple":

http://wiki.joomlart.com/images/e/ec/Me ... column.png
User avatar
Expert Boarder

GK User
Sun Mar 07, 2010 7:23 pm
What a shame :huh:
is it really that impossible to take this php function
Code: Select all
parseInt('<?php echo $this->getParam(GK_TOOL_FONT);?>')

then store it somewhere else, and use it in css?!

anyway thanks for helping..

regards
User avatar
Expert Boarder


cron