佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1621|回复: 12

<知道了,請關貼,謝謝!>如何让Banner自动置中?

[复制链接]
发表于 11-8-2010 12:01 PM | 显示全部楼层 |阅读模式
本帖最后由 liaoyuanci 于 5-2-2011 09:14 PM 编辑

大家好!
我是用Xoops 2.0.14架设网站。
我的网站Banner在 resolution 1280 * 800时,Banner一直在左边。
我尝试在theme.html修改Banner位置为center,但是还是不可以!
请问如何处理呢?是不是要改其它的档案?
谢谢!

-------------------------------------------------------------------------------------------------


-------------------------------------------------------------------------------------------------  

<body>
<table cellspacing="2" cellpadding="0" bgcolor="#3366FF" align="center">
<tr>
    <td bgcolor="#3366FF">
      <table cellspacing="2" cellpadding="0">
   <tr align="center">
            <td align="center" width="1000" height="144" bgcolor="#3366FF"> <TABLE align="center" WIDTH="1000" height="144" BORDER="1" CELLPADDING="0" CELLSPACING="0" background="http://www.xingyinet.org/themes/phpkaox/images/XingyiNetBanner.png"></td>
                <TR>
                  <TD align="center">
         <div align="right">
                      <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="144">
                        <param name="movie" value="http://www.xingyinet.org/themes/phpkaox/images/banner1.swf">
                        <param name="quality" value="high">
                        <param name="wmode" value="transparent">
                        <embed src="http://www.xingyinet.org/themes/phpkaox/images/banner1.swf" wmode='transparent' width="500" height="144" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#000000"></embed></object>
                    </div></TD>
                  <TD height="144" align="center" >
                    <div align="right">
                      <object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="144">
                        <param name="movie" value="http://www.xingyinet.org/themes/phpkaox/images/banner.swf">
                        <param name="quality" value="high">
                        <param name="wmode" value="transparent">
                        <embed src="http://www.xingyinet.org/themes/phpkaox/images/banner.swf" wmode='transparent' width="500" height="144" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#000000"></embed></object>
                    </div></TD>
                </TR>
              </TABLE>
回复

使用道具 举报


ADVERTISEMENT

发表于 12-8-2010 05:27 PM | 显示全部楼层
試下 CSS 在那個banner 上
margin-left:auto;
margin-right:auto;

如果不能,直接給我URL去看。
回复

使用道具 举报

 楼主| 发表于 13-8-2010 12:29 PM | 显示全部楼层
試下 CSS 在那個banner 上
margin-left:auto;
margin-right:auto;

如果不能,直接給我URL去看。
@乐行者~阿酷 发表于 12-8-2010 05:27 PM



您好!請問是 style.css嗎?要安插在哪裡呢?(網址:http://www.xingyinet.org/modules/news/

------------------------------------------------

table { width: 100%; margin: 5; padding: 5; font-size: small}
table td { padding: 0; border-width: 0; vertical-align: top; font-family: Verdana, Arial, Helvetica, sans-serif;}
div#content { padding: 5px; text-align: left;}
div#content td { padding: 3px;}
body { font-family: Tahoma, taipei; color;#000000; font-size: 12px}
a { font-family: Tahoma, taipei; font-size: 12px; text-decoration: none; color: #000000; font-style: normal}
a:hover { text-decoration: underline overline;  font-family: Tahoma, taipei; font-size: 12px; color: #FFFFFF; font-style: normal}
td {  font-family: Tahoma, taipei; color: #000000; font-size: 12px;border-top-width : 1px; border-right-width : 1px; border-bottom-width : 1px; border-left-width : 1px;}
input { background-color : transparent; color : #000000; font-family : Tahoma, taipei, Verdana, Arial, Helvetica, sans-serif; font-size : 12px; font-weight : normal;border-color : #000000;  border-top-width : 1px; border-right-width : 1px; border-bottom-width : 1px; border-left-width : 1px;text-indent : 2px;  }
textarea {font-family: Tahoma, taipei, Verdana, Arial, Helvetica, sans-serif; font-size: 12px;background-color : transparent; font-weight : bold; border-color : #000000;  border-top-width : 1px; border-right-width : 1px; border-bottom-width : 1px; border-left-width : 1px; text-indent : 2px;}
select {font-family: Tahoma, taipei, Verdana, Arial, Helvetica, sans-serif; font-size: 12px;font-weight : bold;background-color:#51A8FF; }
img { border: 0;}
ul { margin: 2px; padding: 2px; list-style: decimal inside; text-align: left;}
li { margin-left: 2px; list-style: disc inside;}
.odd { background-color: #DFEFFF;}
.outer { background-color: #3399FF;}
.even { background-color: #51A8FF;}
th { background-color: #3399FF; text-align: left; padding: 3px;}
.head { background-color: #3399FF; padding: 3px;}
.foot { background-color: #3399FF; padding: 3px;}
.comTitle {font-weight: bold; margin-bottom: 2px;}
.comText {font-size: 14px; padding: 2px;}
.comUserStat {font-size: 10px; color: #000000; font-weight:bold; border: 1px solid #51A8FF; background-color: #DFEFFF; margin: 2px; padding: 2px;}
.comUserStatCaption {font-weight: normal;}
.comUserStatus {margin-left: 2px; margin-top: 10px; color: #000000; font-weight:bold; font-size: 10px;}
.comUserRank {margin: 2px;}
.comUserRankText {font-size: 10px;font-weight:bold;}
.comUserRankImg {border: 0;}
.comUserName {}
.comUserImg {margin: 2px;}
.comDate {font-weight: normal; font-style: italic; font-size: smaller}
.comDateCaption {font-weight: bold; font-style: normal;}
.item {border: 1px solid #51A8FF;}
.itemHead {background-color: #3399FF; color: #000000; padding: 2px; font-weight: bold; text-align: left;}
.itemInfo {text-align: right; padding: 3px; background-color: #51A8FF}
.itemTitle a {font-size: 130%; font-weight: bold; font-variant: small-caps; color: #000000; background-color: transparent;}
.itemPoster {font-size: 100%; font-style:italic;}
.itemPostDate {font-size: 100%; font-style:italic;}
.itemStats {font-size: 100%; font-style:italic;}
.itemBody {padding-left: 5px; text-align: left}
.itemText {font-size: 14px; margin-top: 5px; margin-bottom: 5px; line-height: 1.5em;}
.itemText:first-letter {font-size: 135%; font-weight: bold;}
.itemFoot {text-align: right; padding: 3px; background-color: #DFEFFF}
.itemAdminLink {font-size: 100%;}
.itemPermaLink {font-size: 100%;}
.blockTitle {background-color:#3399FF ; color:#000000; padding: 2px; font-weight: bold}
.blockContent {background-color: #51A8FF; padding: 2px;}

------------------------------------------------
回复

使用道具 举报

发表于 14-8-2010 09:19 AM | 显示全部楼层
您好!請問是 style.css嗎?要安插在哪裡呢?(網址:)

-------------------------------------- ...
liaoyuanci 发表于 13-8-2010 12:29 PM

直接放style 在那個table 裡面


<table width="1000" align="center" background="XingyiNetBanner.png" border="1" cellpadding="0" cellspacing="0" height="144">

改去

<table style='background-image:url("XingyiNetBanner.png"); background-repeat:no-repeat; background-position:top center; ' width="1000" align="center" border="10" cellpadding="0" cellspacing="0" height="144">
回复

使用道具 举报

 楼主| 发表于 14-8-2010 10:58 AM | 显示全部楼层
本帖最后由 liaoyuanci 于 14-8-2010 11:05 AM 编辑

回复 4# @乐行者~阿酷


我把你提供的代碼加到 theme.html , 還是不可以耶!

可真難搞也!

回复

使用道具 举报

发表于 14-8-2010 01:02 PM | 显示全部楼层
本帖最后由 小陈陈 于 14-8-2010 01:11 PM 编辑
回复  @乐行者~阿酷


我把你提供的代碼加到 theme.html , 還是不可以耶!

可真難搞也!
liaoyuanci 发表于 14-8-2010 10:58 AM


给我看你的url和。。。你是用什么browser的。。。因为我只看你的flash而已。。没有看你的image 。。。

而且。。。test了你的code。。。看到的是在中间哦~

我用
FF3
IE7
Chrome
看都是在中间。。。如果用你的coding的话啦。。。
回复

使用道具 举报

Follow Us
发表于 14-8-2010 04:50 PM | 显示全部楼层
回复  @乐行者~阿酷


我把你提供的代碼加到 theme.html , 還是不可以耶!

可真難搞也!
liaoyuanci 发表于 14-8-2010 10:58 AM

我這裡的browser 是Ok或者您試下clear cache 再看看
如果不能,再告訴我吧。
回复

使用道具 举报

 楼主| 发表于 14-8-2010 10:23 PM | 显示全部楼层
您們好!會不會是我的電腦設定在  resolution 1280 * 800 的原因呢?
我會在測試看看!
謝謝!
回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 16-8-2010 01:37 PM | 显示全部楼层
還是老樣子!!!!
回复

使用道具 举报

 楼主| 发表于 20-8-2010 03:40 PM | 显示全部楼层
在Firefox是ok,沒問題的!
IE就偏左!不知道是哪一部分編碼有問題!?
回复

使用道具 举报

发表于 20-8-2010 09:40 PM | 显示全部楼层
有一个width是1000的。。。看换去100%看能不能
回复

使用道具 举报

发表于 20-8-2010 09:42 PM | 显示全部楼层
本帖最后由 小陈陈 于 20-8-2010 09:43 PM 编辑

<td align="center" width="1000" height="144" bgcolor="#3366FF">

改去

<td align="center" width="100%" height="144" bgcolor="#3366FF">
回复

使用道具 举报

 楼主| 发表于 22-8-2010 11:38 AM | 显示全部楼层
改去
小陈陈 发表于 20-8-2010 09:42 PM


謝謝您!也謝謝大家的指點。

我改成100%後,可以了!《置中》
回复

使用道具 举报

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

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 24-11-2025 03:47 AM , Processed in 0.133054 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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