Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[已解决] 请问下7.2使用6.0模板时让顶部logo居中显示怎么修改

[复制链接]
時間飛了 发表于 2010-9-6 19:38:28 | 显示全部楼层 |阅读模式
问题描述
适用版本: Discuz! 7.2
浏览器: IE7 IE8 IE9 
使用模板: 官方模板
BUG地址: http://www.tianyouzhai.com
css_append:
  1. /* ***** *---- ****- ***-- ----* ***-- ***-- ***-- */
  2. body { background-color: {WRAPBG}; }
  3. #ad_headerbanner { margin: 15px 0 5px; }
  4. .ad_text { margin-bottom: 10px; padding: 2px 0; border: 1px solid {WRAPBORDERCOLOR}; background: url({STYLEIMGDIR}/portalbox_bg.gif) repeat-x; zoom: 1; }
  5.         .ad_text td { padding: 3px 5px; }
  6. .ad_column { margin-bottom: 10px; }

  7. #wrap { padding-bottom: 0; }
  8. #index #wrap, #forumdisplay #wrap, #viewthread .wrap, .forumcontrol table { border: none; background: transparent !important; }

  9. #header .wrap { padding: 0; }
  10. #header h2 { margin: 8px 0; }
  11. #header .pipe { text-indent: -9999px; background: url({STYLEIMGDIR}/menu_itemline.gif) no-repeat 0 2px; }
  12. .discuz6_hd { clear: both; height: 31px; border: 1px solid {WRAPBORDERCOLOR}; background: {WRAPBG} url({STYLEIMGDIR}/menu_bg.gif) repeat-x; }
  13.         #menu, #umenu { position: static; }
  14.                 #menu{ float: right; margin: 5px 3px 0 0; }
  15.                         * html #menu { position: relative; margin-top: 3px; }
  16.                         #menu li { margin: 0; background: url({STYLEIMGDIR}/menu_itemline.gif) no-repeat 0 7px; }
  17.                                 #menu li.current { border: 1px solid; border-color: {WRAPBORDERCOLOR} {WRAPBORDERCOLOR} {WRAPBG}; }
  18.                         #menu a { padding: 0 10px; height: 26px; line-height: 26px; border: none; color: {LINK}; }
  19.                                 #menu a:hover { background-color: transparent; }
  20.                                 #menu li.current a, #menu li.current a:hover { height: 26px; background: {WRAPBG}; }
  21.                 #umenu { float: left; display: inline; margin-left: 8px; line-height: 31px; }
  22.                         #umenu a { margin: 0 3px; }
  23. #nav { text-indent: 0; background: none; }
  24.         #nav a { font-weight: 700; color: {HIGHLIGHTLINK}; }

  25. .content { background: url({STYLEIMGDIR}/portalbox_bg.gif) repeat-x; }
  26. .list { margin-bottom: 10px; padding: 1px; border: 1px solid {MENUHOVER}; }
  27.         .content .list h3 { padding-left: 9px; line-height: 31px; background: #325fA2 url({STYLEIMGDIR}/header_bg.gif) repeat-x; color: #FFF; }
  28.                 .list h3 a { color: #FFF; }
  29.         .list th { padding-left: 55px !important; background-image: url({STYLEIMGDIR}/forum.gif); background-position: 13px 10px; }
  30.                 .list th.new { background-image: url({STYLEIMGDIR}/forum_new.gif); }
  31. .fcontent .list { border-right: none; border-left: none; }

  32. #sidebar_img { margin-right: 0; }
  33.         .with_side #sidebar_img { margin-bottom: 19px; }

  34. #online, #bdays { border: 1px solid {WRAPBORDERCOLOR}; }
  35.         #online h3, #bdays h3 { background: {WRAPBG} url({STYLEIMGDIR}/portalbox_bg.gif) repeat-x; color: {MIDTEXT}; }
  36.                 #online h3 a, #bdays h3 a { color: {HIGHLIGHTLINK}; }

  37. .folder { width: 40px; }
  38.         .folder a { text-decoration: none !important; }
  39.         .folder img { vertical-align: middle; }

  40. .editorrow, .editor_tb, a.editormode { background: #F7F7F7; }
  41. .editor a, .editor em { border-color: #F7F7F7 !important; }
  42.         a.oneditor, .editor a:hover { border-color: #888 !important; }

  43. #footer { overflow: hidden; margin-top: 15px; border-top: 1px solid {MENUHOVER}; background: #E8F3FD; }
  44.         #footer .wrap { background: none; }
  45.         #rightinfo { padding-left: 38px; background: url({STYLEIMGDIR}/discuz_icon.gif) no-repeat 0 5px; }

  46. .searchlist { margin: 0 !important; border-color: {WRAPBORDERCOLOR} !important; border-width: 1px 0 0 !important; }
  47.         .searchlist .itemtitle { margin: 0; padding: 0 10px; height: 31px; line-height: 31px; background: url({STYLEIMGDIR}/header_bg.gif) repeat-x; color: #FFF; }
  48.                 .searchlist .itemtitle .pages, .searchlist .itemtitle .pageback { margin-top: 2px; }
  49.         .searchlist .pages_btns { padding-bottom: 5px; border-top: 1px solid {WRAPBORDERCOLOR}; background: #E8F3FD; }

  50. .pbl_selected a, .pbl_selected a:hover { background-color: #3F7DBA; }
  51. .headactions { padding: 10px 12px 0 0; *padding: 8px 12px 0 0; }
  52.         .mainbox .headactions { color: #FFF; }
  53.         .headactions a { color: #FFF; }
  54. #style_switch { position: static; float: right; margin: 15px 0 -25px; }/* fix IE6+ */
  55.         * html #style_switch { position: absolute; float: none; margin: 0; }/* fix IE6 */
复制代码
header:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=$charset" />
  5. <title>$navtitle $bbname $seotitle - Powered by Discuz!</title>
  6. $seohead
  7. <meta name="keywords" content="{$metakeywords}$seokeywords" />
  8. <meta name="description" content="$metadescription $bbname $seodescription - Discuz! Board" />
  9. <meta name="generator" content="Discuz! $version" />
  10. <meta name="author" content="Discuz! Team and Comsenz UI Team" />
  11. <meta name="copyright" content="2001-2009 Comsenz Inc." />
  12. <meta name="MSSmartTagsPreventParsing" content="True" />
  13. <meta http-equiv="MSThemeCompatible" content="Yes" />
  14. <meta http-equiv="x-ua-compatible" content="ie=7" />
  15. <link rel="archives" title="$bbname" href="{$boardurl}archiver/" />
  16. $rsshead
  17. $extrahead
  18. {csstemplate}
  19. <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>
  20. <script type="text/javascript" src="{$jspath}common.js?{VERHASH}"></script>
  21. </head>

  22. <body id="{CURSCRIPT}" onkeydown="if(event.keyCode==27) return false;">

  23.         <div id="append_parent"></div><div id="ajaxwaitid"></div>
  24.         <div id="header">
  25.                 <div class="wrap s_clear">
  26.                         <h2><a href="$indexname" title="$bbname">{BOARDLOGO}</a></h2>
  27.                         <div id="ad_headerbanner"><!--{if $admode && empty($insenz['hardadstatus']) && !empty($advlist['headerbanner'])}-->$advlist[headerbanner]<!--{/if}--></div>
  28.                         <div class="discuz6_hd">
  29.                                 <div id="umenu">
  30.                                 <!--{if $discuz_uid}-->
  31.                                         <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>
  32.                                         <span class="pipe"> </span>
  33.                                         <!--{if $ucappopen['UCHOME']}-->
  34.                                                 <a href="{$uchomeurl}/space.php?uid=$discuz_uid" target="_blank">{lang space_short}</a>
  35.                                         <!--{elseif $ucappopen['XSPACE']}-->
  36.                                                 <a href="{$xspaceurl}/?uid-$discuz_uid" target="_blank">{lang space_short}</a>
  37.                                         <!--{/if}-->
  38.                                 <a id="myprompt" href="notice.php" <!--{if $prompt}-->class="new" onmouseover="showMenu({'ctrlid':this.id})"<!--{/if}-->>{lang notice}</a>
  39.                                 <span id="myprompt_check"></span>
  40.                                 <a href="pm.php" id="pm_ntc" target="_blank">{lang pm_center}</a>
  41.                                         <!--{if $taskon}-->
  42.                                                 <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>
  43.                                         <!--{/if}-->
  44.                                         <span class="pipe"> </span>
  45.                                         <a href="memcp.php">{lang user_center}</a>
  46.                                         <!--{if $discuz_uid && $adminid > 1}--><a href="modcp.php?fid=$fid" target="_blank">{lang modcp}</a><!--{/if}-->
  47.                                         <!--{if $discuz_uid && $adminid == 1}--><a href="admincp.php" target="_blank">{lang admincp}</a><!--{/if}-->
  48.                                         <a href="logging.php?action=logout&formhash={FORMHASH}">{lang logout}</a>
  49.                                 <!--{elseif !empty($_DCOOKIE['loginuser'])}-->
  50.                                         <cite><a id="loginuser" class="noborder">$_DCOOKIE['loginuser']</a></cite>
  51.                                 <a href="logging.php?action=login" onclick="showWindow('login', this.href);return false;">{lang activation}</a>
  52.                                         <a href="logging.php?action=logout&formhash={FORMHASH}">{lang logout}</a>
  53.                                 <!--{else}-->
  54.                                 <a href="$regname" onclick="showWindow('register', this.href);return false;" class="noborder">$reglinkname</a>
  55.                                 <a href="logging.php?action=login" onclick="showWindow('login', this.href);return false;">{lang login}</a>
  56.                                 <!--{/if}-->
  57.                                 </div>
  58.                                 <div id="menu">
  59.                                         <ul>
  60.                                                 <!--{if $_DCACHE['settings']['frameon'] > 0}-->
  61.                                                         <li>
  62.                                                         <span class="frameswitch">
  63.                                                         <script type="text/javascript">
  64.                                                                 if(top == self) {
  65.                                                                         {if ($_DCACHE['settings']['frameon'] == 2 && !defined('CACHE_FILE') && in_array(CURSCRIPT, array('index', 'forumdisplay', 'viewthread')) && (($_DCOOKIE['frameon'] == 'yes' && $_GET['frameon'] != 'no') || (empty($_DCOOKIE['frameon']) && empty($_GET['frameon']))))}
  66.                                                                         top.location = 'frame.php?frameon=yes&referer='+escape(self.location);
  67.                                                                         {/if}
  68.                                                                         document.write('<a href="frame.php?frameon=yes" target="_top" class="frameon">{lang frameon_column}<\/a>');
  69.                                                                 } else {
  70.                                                                         document.write('<a href="frame.php?frameon=no" target="_top" class="frameoff">{lang frameon_flat}<\/a>');
  71.                                                                 }
  72.                                                         </script>
  73.                                                         </span>
  74.                                                         </li>
  75.                                                 <!--{/if}-->
  76.                                                 <!--{loop $navs $id $nav}-->
  77.                                                         <!--{if $id == 3}-->
  78.                                                                 <!--{if !empty($plugins['jsmenu'])}-->
  79.                                                                         $nav[nav]
  80.                                                                 <!--{/if}-->
  81.                                                                 <!--{if !empty($plugins['links'])}-->
  82.                                                                         <!--{loop $plugins['links'] $module}-->
  83.                                                                                 <!--{if !$module['adminid'] || ($module['adminid'] && $adminid > 0 && $module['adminid'] >= $adminid)}--><li>$module[url]</li><!--{/if}-->
  84.                                                                         <!--{/loop}-->
  85.                                                                 <!--{/if}-->
  86.                                                         <!--{else}-->
  87.                                                                 <!--{if !$nav['level'] || ($nav['level'] == 1 && $discuz_uid) || ($nav['level'] == 2 && $adminid > 0) || ($nav['level'] == 3 && $adminid == 1)}-->$nav[nav]<!--{/if}-->
  88.                                                         <!--{/if}-->
  89.                                                 <!--{/loop}-->
  90.                                                 <!--{if in_array($BASEFILENAME, $navmns)}-->
  91.                                                         {eval $mnid = $BASEFILENAME;}
  92.                                                 <!--{elseif $navmngs[$BASEFILENAME]}-->
  93.                                                         <!--{loop $navmngs[$BASEFILENAME] $navmng}-->
  94.                                                                 <!--{if $navmng[0] == array_intersect_assoc($navmng[0], $_GET)}-->{eval $mnid = $navmng[1];}<!--{/if}-->
  95.                                                         <!--{/loop}-->
  96.                                                 <!--{/if}-->
  97.                                         </ul>
  98.                                         <script type="text/javascript">
  99.                                                 var currentMenu = $('mn_$mnid') ? $('mn_$mnid') : $('mn_$navmns[0]');
  100.                                                 currentMenu.parentNode.className = 'current';
  101.                                         </script>
  102.                                 </div>
  103.                         </div>
  104.                         <!--{if !empty($stylejumpstatus)}-->
  105.                                 <script type="text/javascript">
  106.                                         function setstyle(styleid) {
  107.                                                 str = unescape('{echo str_replace("'", "\\'", urlencode($_SERVER[QUERY_STRING]))}');
  108.                                                 str = str.replace(/(^|&)styleid=\d+/ig, '');
  109.                                                 str = (str != '' ? str + '&' : '') + 'styleid=' + styleid;
  110.                                                 location.href = '$BASESCRIPT?' + str;
  111.                                         }
  112.                                 </script>
  113.                                 <ul id="style_switch">
  114.                                 <!--{loop $styles $id $stylename}-->
  115.                                         <li{if $id == STYLEID} class="current"{/if}><a href="###" onclick="setstyle($id)" title="$stylename" style="background: $styleicons[$id];">$stylename</a></li>
  116.                                 <!--{/loop}-->
  117.                                 </ul>
  118.                         <!--{/if}-->
  119.                 </div>
  120.                 <div id="myprompt_menu" style="display:none" class="promptmenu">
  121.                         <div class="promptcontent">
  122.                                 <ul class="s_clear">
  123.                                 <!--{loop $prompts $promptkey $promptdata}-->
  124.                                         <!--{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}-->
  125.                                 <!--{/loop}-->
  126.                                 </ul>
  127.                         </div>
  128.                 </div>
  129.         </div>
  130.         $pluginhooks[global_header]
复制代码
回复

使用道具 举报

 楼主| 時間飛了 发表于 2010-9-6 19:39:25 | 显示全部楼层
模板是原来官方发布的那个,可是现在搜不到了
回复

使用道具 举报

deviljing 发表于 2010-9-6 22:55:30 | 显示全部楼层
- - 楼主的站百分比宽度,LOGO居中的话很难看~
回复

使用道具 举报

 楼主| 時間飛了 发表于 2010-9-6 23:52:20 | 显示全部楼层
deviljing 发表于 2010-9-6 22:55
- - 楼主的站百分比宽度,LOGO居中的话很难看~

我的显示器是刚刚好。。。主要是宽屏的都说右面空白不协调
回复

使用道具 举报

elevensky 发表于 2010-9-7 13:54:25 | 显示全部楼层
修改css文件将#header h2的样式重新定义为如下:
  1. #header h2 {margin:8px 0;text-align:center;width:100%;}
复制代码
回复

使用道具 举报

 楼主| 時間飛了 发表于 2010-9-7 14:11:46 | 显示全部楼层
elevensky 发表于 2010-9-7 13:54
修改css文件将#header h2的样式重新定义为如下:

谢谢(EM:131:)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-5 23:01 , Processed in 0.110906 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表