News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to remove excess space between banner and navigation buttons?

Started by kibtwane, October 13, 2010, 09:12:17 AM

Previous topic - Next topic

kibtwane

I removed the SMF logo from by board and replaced it with a banner, which has left a sizable blank space between the banner and the navigation buttons. What code needs to be modified to remove this excess space?

Many thanks.

http://www.thechristianidentityforum.net/smf

Hj Ahmad Rasyid Hj Ismail

Firstly, I like your forum on SMF 1.1.11 more as it just fit nicely. But hey, it's your forum and you may choose your preferred forum.

Secondly, the menu position is just nice since when the user info in the header is closed, the padding above and below it is just right. By the way, the gaps (above and below menu) are caused by the extra lines created in the default theme index.template.php file. Find:
        echo '
            </div>
        </div>
        <br class="clear" />';

    // Define the upper_section toggle in JavaScript.
    echo '
        <script type="text/javascript"><!-- // --><![CDATA[
            var oMainHeaderToggle = new smc_Toggle({
                bToggleEnabled: true,
                bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
                aSwappableContainers: [
                    \'upper_section\'
                ],
                aSwapImages: [
                    {
                        sId: \'upshrink\',
                        srcExpanded: smf_images_url + \'/upshrink.png\',
                        altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
                        srcCollapsed: smf_images_url + \'/upshrink2.png\',
                        altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
                    }
                ],
                oThemeOptions: {
                    bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
                    sOptionName: \'collapse_header\',
                    sSessionVar: ', JavaScriptEscape($context['session_var']), ',
                    sSessionId: ', JavaScriptEscape($context['session_id']), '
                },
                oCookieOptions: {
                    bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
                    sCookieName: \'upshrink\'
                }
            });
        // ]]></script>';

        // Show the menu here, according to the menu sub template.
        template_menu();

    echo '
            <br class="clear" />';

Replace:
        echo '
            </div>
        </div>';
/*
            <br class="clear" />';
*/
    // Define the upper_section toggle in JavaScript.
    echo '
        <script type="text/javascript"><!-- // --><![CDATA[
            var oMainHeaderToggle = new smc_Toggle({
                bToggleEnabled: true,
                bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
                aSwappableContainers: [
                    \'upper_section\'
                ],
                aSwapImages: [
                    {
                        sId: \'upshrink\',
                        srcExpanded: smf_images_url + \'/upshrink.png\',
                        altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
                        srcCollapsed: smf_images_url + \'/upshrink2.png\',
                        altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
                    }
                ],
                oThemeOptions: {
                    bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
                    sOptionName: \'collapse_header\',
                    sSessionVar: ', JavaScriptEscape($context['session_var']), ',
                    sSessionId: ', JavaScriptEscape($context['session_id']), '
                },
                oCookieOptions: {
                    bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
                    sCookieName: \'upshrink\'
                }
            });
        // ]]></script>';

        // Show the menu here, according to the menu sub template.
        template_menu();
/*
    echo '
            <br class="clear" />';
*/

kibtwane

Ahrasis, as always, thank you for your help.

That did reduce some of the gap but not as much as I would like.  Is there a way to reduce it further so that the banner sits, say, 25 pixels above the menu buttons?

Hj Ahmad Rasyid Hj Ismail

25 pixels? Before that, remove smf logo and see how you forum will look like without it.

Advertisement: