SCLUB免費論壇申請-使用者論壇's Archiver

chill 發表於 2019-8-6 09:52

为什么我这个导航栏不显示出来?怎么处理

[attach]79846[/attach]


[attach]79845[/attach]

我这里头部里面的代码有导航的代码
可是页面不显示出来,什么问题呢?
下面是头部代码。

网址:[url]http://tnk.imotor.com/index.php[/url]

[free][code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>$navtitle $bbname $seotitle </title>
$seohead
<meta name="keywords" content="{$metakeywords}$seokeywords" />
<meta name="description" content="$metadescription $bbname $seodescription" />
<meta name="generator" content="Discuz! $version" />
<meta name="author" content="Discuz! Team and Comsenz UI Team" />
<meta name="copyright" content="2001-2009 Comsenz Inc." />
<meta name="MSSmartTagsPreventParsing" content="True" />
<meta http-equiv="MSThemeCompatible" content="Yes" />
<meta http-equiv="x-ua-compatible" content="ie=7" />



<link rel="archives" title="$bbname" href="{$boardurl}archiver/" />
$rsshead
$extrahead
{csstemplate}
<script type="text/javascript">var STYLEID = '{STYLEID}', IMGDIR = '{IMGDIR}', VERHASH = '{VERHASH}', charset = '$charset', discuz_uid = $discuz_uid, cookiedomain = '$cookiedomain', cookiepath = '$cookiepath', attackevasive = '$attackevasive', disallowfloat = '$disallowfloat', creditnotice = '{if $creditnotice}$creditnames{/if}', {if in_array(CURSCRIPT, array('viewthread', 'forumdisplay'))}gid = parseInt('$thisgid'){elseif CURSCRIPT == 'index'}gid = parseInt('$gid'){else}gid = 0{/if}, fid = parseInt('$fid'), tid = parseInt('$tid')</script>
<script type='text/javascript' src='/templates/greenwall/j_jquery.htm'></script>
<script type='text/javascript' src='/templates/greenwall/j_jquery.min.htm'></script>
<script type="text/javascript" src="{$jspath}common.js?{VERHASH}"></script>
<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script>
</head>



        <div id="append_parent"></div><div id="ajaxwaitid"></div>


<div class="topbar-sticky">
  <div class="topbar-line">
    &nbsp;
  </div>
  <div class="wrapper">
    <div class="menu-content clearfix left">
      <nav class="mainmenu">
        <ul id="menu-main-menu" class="menu clear">
                  <li id="menu-item-8464" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8464">
            <a href="http://tnk.imotor.com/">
              <b>首页</b>
            </a>
          </li>
          <li id="menu-item-8286" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-8197 current_page_item menu-item-8286">
            <a href="index.php">
              <b>论坛</b>
            </a>
          </li>
          <li id="menu-item-8458" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8458">
            <a href="plugin.php?id=dps_sign:sign">
              <b>每日签到</b>
            </a>
          </li>
          <li id="menu-item-8457" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8457">
            <a href="search.php">
              <b>搜索</b>
            </a>
          </li>
          <li id="menu-item-8438" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8438">
            <a href="faq.php">
              <b>帮助</b>
            </a>
          </li>
        </ul>
      </nav>
      <div id="slidingArrow">
        &nbsp;
      </div>
    </div>
        <div id="amenu">
                        <!--{if $discuz_uid}-->
                                <cite><a href="space.php?uid=$discuz_uid" class="noborder">$discuz_userss</a><!--{if $allowinvisible}--><span id="loginstatus"><!--{if !empty($invisible)}--><a href="member.php?action=switchstatus" onclick="ajaxget(this.href, 'loginstatus');doane(event);">{lang login_invisible_mode}</a><!--{else}--><a href="member.php?action=switchstatus" title="{lang login_switch_invisible_mode}" onclick="ajaxget(this.href, 'loginstatus');doane(event);">{lang login_normal_mode}</a><!--{/if}--></span><!--{/if}--></cite>
                                <span class="pipe">|</span>
                                <!--{if $ucappopen['UCHOME']}-->
                                        <a href="{$uchomeurl}/space.php?uid=$discuz_uid" target="_blank">{lang space_short}</a>
                                <!--{elseif $ucappopen['XSPACE']}-->
                                        <a href="{$xspaceurl}/?uid-$discuz_uid" target="_blank">{lang space_short}</a>
                                <!--{/if}-->
                                <a id="myprompt" href="notice.php" <!--{if $prompt}-->class="new" onmouseover="showMenu({'ctrlid':this.id})"<!--{/if}-->>{lang notice}</a>
                                <span id="myprompt_check"></span>
                                <a href="pm.php" id="pm_ntc" target="_blank">{lang pm_center}</a>
                                <!--{if $taskon}-->
                                        <a id="task_ntc" {if $doingtask}href="task.php?item=doing" class="new" title="{lang task_unfinish}"{else}href="task.php"{/if} target="_blank">{lang task}</a>
                                <!--{/if}-->

                                <span class="pipe">|</span>
                                <a href="memcp.php">{lang user_center}</a>
                                <!--{if $discuz_uid && $adminid > 1}--><a href="modcp.php?fid=$fid" target="_blank">{lang modcp}</a><!--{/if}-->
                                <!--{if $discuz_uid && $adminid == 1}--><a href="admincp.php" target="_blank">{lang admincp}</a><!--{/if}-->
                                <a href="logging.php?action=logout&formhash={FORMHASH}">{lang logout}</a>
                        <!--{elseif !empty($_DCOOKIE['loginuser'])}-->
                                <cite><a id="loginuser" class="noborder">$_DCOOKIE['loginuser']</a></cite>
                                <a href="logging.php?action=login" onclick="showWindow('login', this.href);return false;">{lang activation}</a>
                                <a href="logging.php?action=logout&formhash={FORMHASH}">{lang logout}</a>
                        <!--{else}-->
                                <a href="$regname" onclick="showWindow('register', this.href);return false;" class="noborder">$reglinkname</a>
                                <a href="logging.php?action=login" onclick="showWindow('login', this.href);return false;">{lang login}</a>
                        <!--{/if}-->
                </div>

  </div>
</div>


<div style="height:51px"></div>
<body id="{CURSCRIPT}" onkeydown="if(event.keyCode==27) return false;">


        <div id="header">
                <div class="wrap s_clear">
                        <h2><a href="$indexname" title="$bbname">{BOARDLOGO}</a></h2>
                       
                        <div id="ad_headerbanner"><!--{if $admode && !empty($advlist['headerbanner'])}-->$advlist[headerbanner]<!--{/if}--></div>
                       
                        <!--{if !empty($stylejumpstatus)}-->
                                <script type="text/javascript">
                                        function setstyle(styleid) {
                                                str = unescape('{echo str_replace("'", "\\'", urlencode($_SERVER[QUERY_STRING]))}');
                                                str = str.replace(/(^|&)styleid=\d+/ig, '');
                                                str = (str != '' ? str + '&' : '') + 'styleid=' + styleid;
                                                location.href = '$BASESCRIPT?' + str;
                                        }
                                </script>
                                <ul id="style_switch">
                                <!--{loop $styles $id $stylename}-->
                                        <li{if $id == STYLEID} class="current"{/if}><a href="###" onclick="setstyle($id)" title="$stylename" style="background: $styleicons[$id];">$stylename</a></li>
                                <!--{/loop}-->
                                </ul>
                        <!--{/if}-->
                </div>
                <div id="myprompt_menu" style="display:none" class="promptmenu">
                        <div class="promptcontent">
                                <ul class="s_clear">
                                <!--{loop $prompts $promptkey $promptdata}-->
                                        <!--{if $promptkey}--><li{if !$promptdata[new]} style="display:none"{/if}><a id="prompt_$promptkey" href="{if $promptdata[script]}$promptdata[script]{else}notice.php?filter=$promptkey{/if}" target="_blank">$promptdata[name] ($promptdata[new])</a></li><!--{/if}-->
                                <!--{/loop}-->
                                </ul>
                        </div>
                </div>
        </div>
        $pluginhooks[global_header][/code][/free]

小枫 發表於 2019-8-6 13:31

查找[code]<ul id="menu-main-menu" class="menu clear">[/code]改成[code]<ul id="menu-main-menu" class="menu">[/code]因爲clear設定了高度height為0,所以不顯示。

chill 發表於 2019-8-6 15:19

[b]回復 [url=http://sclub.com.tw/discuz/redirect.php?goto=findpost&pid=299553&ptid=35625]2#[/url] [i]小枫[/i] [/b]




[attach]79850[/attach]


[size=4][color=Red]我怎么样能在左上角这个位置加个LOGO图片
使得没那么空,应该怎么修改代码才可以。[/color][/size]

无界 發表於 2019-8-6 15:45

把这段代码重新放置[code]<div class="topbar-sticky">
  <div class="topbar-line">
    &nbsp;
  </div>
  <div class="wrapper">
    <div class="menu-content clearfix left">
      <nav class="mainmenu">
        <ul id="menu-main-menu" class="menu clear">
                  <li id="menu-item-8464" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8464">
            <a href="http://tnk.imotor.com/">
              <b>首页</b>
            </a>
          </li>
          <li id="menu-item-8286" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-8197 current_page_item menu-item-8286">
            <a href="index.php">
              <b>论坛</b>
            </a>
          </li>
          <li id="menu-item-8458" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8458">
            <a href="plugin.php?id=dps_sign:sign">
              <b>每日签到</b>
            </a>
          </li>
          <li id="menu-item-8457" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8457">
            <a href="search.php">
              <b>搜索</b>
            </a>
          </li>
          <li id="menu-item-8438" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8438">
            <a href="faq.php">
              <b>帮助</b>
            </a>
          </li>
        </ul>
      </nav>
      <div id="slidingArrow">
        &nbsp;
      </div>
    </div>
        <div id="amenu">
                        <!--{if $discuz_uid}-->
                                <cite><a href="space.php?uid=$discuz_uid" class="noborder">$discuz_userss</a><!--{if $allowinvisible}--><span id="loginstatus"><!--{if !empty($invisible)}--><a href="member.php?action=switchstatus" onclick="ajaxget(this.href, 'loginstatus');doane(event);">{lang login_invisible_mode}</a><!--{else}--><a href="member.php?action=switchstatus" title="{lang login_switch_invisible_mode}" onclick="ajaxget(this.href, 'loginstatus');doane(event);">{lang login_normal_mode}</a><!--{/if}--></span><!--{/if}--></cite>
                                <span class="pipe">|</span>
                                <!--{if $ucappopen['UCHOME']}-->
                                        <a href="{$uchomeurl}/space.php?uid=$discuz_uid" target="_blank">{lang space_short}</a>
                                <!--{elseif $ucappopen['XSPACE']}-->
                                        <a href="{$xspaceurl}/?uid-$discuz_uid" target="_blank">{lang space_short}</a>
                                <!--{/if}-->
                                <a id="myprompt" href="notice.php" <!--{if $prompt}-->class="new" onmouseover="showMenu({'ctrlid':this.id})"<!--{/if}-->>{lang notice}</a>
                                <span id="myprompt_check"></span>
                                <a href="pm.php" id="pm_ntc" target="_blank">{lang pm_center}</a>
                                <!--{if $taskon}-->
                                        <a id="task_ntc" {if $doingtask}href="task.php?item=doing" class="new" title="{lang task_unfinish}"{else}href="task.php"{/if} target="_blank">{lang task}</a>
                                <!--{/if}-->

                                <span class="pipe">|</span>
                                <a href="memcp.php">{lang user_center}</a>
                                <!--{if $discuz_uid && $adminid > 1}--><a href="modcp.php?fid=$fid" target="_blank">{lang modcp}</a><!--{/if}-->
                                <!--{if $discuz_uid && $adminid == 1}--><a href="admincp.php" target="_blank">{lang admincp}</a><!--{/if}-->
                                <a href="logging.php?action=logout&formhash={FORMHASH}">{lang logout}</a>
                        <!--{elseif !empty($_DCOOKIE['loginuser'])}-->
                                <cite><a id="loginuser" class="noborder">$_DCOOKIE['loginuser']</a></cite>
                                <a href="logging.php?action=login" onclick="showWindow('login', this.href);return false;">{lang activation}</a>
                                <a href="logging.php?action=logout&formhash={FORMHASH}">{lang logout}</a>
                        <!--{else}-->
                                <a href="$regname" onclick="showWindow('register', this.href);return false;" class="noborder">$reglinkname</a>
                                <a href="logging.php?action=login" onclick="showWindow('login', this.href);return false;">{lang login}</a>
                        <!--{/if}-->
                </div>

  </div>
</div>


<div style="height:51px"></div>[/code]删掉[code]<div style="height:51px"></div>[/code]剩下的代码放到[code]<body id="{CURSCRIPT}" onkeydown="if(event.keyCode==27) return false;">[/code]的下边。


.topbar-sticky的css改为:[code].topbar-sticky {
    width: 100%;
    height: 51px;
    background: url(style_2_common.css) scroll 0 0 repeat #333333;
    z-index: 1000;
}[/code]#header h2的css改为[code]#header h2 {
    margin: -180px 0 0 -280px;
    position: absolute;
    display: block!important;
}[/code]

小枫 發表於 2019-8-6 17:30

或許可以參考一下樓上的。
又或者想暴力點的話你可以參考我的。

搜索[code]<ul id="menu-main-menu" class="menu">[/code]改成[code]
<ul id="menu-main-menu" class="menu">
<li id="menu-item-8464" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-8464">
    <a href="$indexname" title="$bbname">{BOARDLOGO}</a>
</li>
[/code]即可。

chill 發表於 2019-8-7 11:30

[b]回復 [url=http://sclub.com.tw/discuz/redirect.php?goto=findpost&pid=299561&ptid=35625]5#[/url] [i]小枫[/i] [/b]


[attach]79852[/attach]

我按照你的方法了,能不能把LOGO还能调整向左前一点,LOGO大了还能怎么设置一下?

小枫 發表於 2019-8-7 14:51

[i=s] 本帖最後由 小枫 於 2019-8-7 14:56 編輯 [/i]

1.修改图片
在css_common里面放入下面的代码:[code].topbar-sticky a .img{ height: 100%; }[/code]2.修改LOGO位置,为保证左右文字对称推荐使用下面的代码:
在css_common里面找到[code].topbar-sticky .wrapper[/code]将里面的width: 1000px;修改为1500px;左右(根据自己需求修改)。

3.导航文字为看起来垂直效果好一点推荐使用下方代码:
搜索:[code].topbar-sticky .wrapper[/code]将 padding: 8px 0 0; 修改为 padding: 5px 0 0;

修改完记得更新模板缓存。

chill 發表於 2019-8-7 15:48

[b]回復 [url=http://sclub.com.tw/discuz/redirect.php?goto=findpost&pid=299615&ptid=35625]7#[/url] [i]小枫[/i] [/b]


    我在css_common找不到.topbar-sticky .wrapper
我放弃了。我直接把LOGO图片缩小了 哈哈

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.