1 頁 (共 1 頁)

[問題] index_body.tpl 修改不良

發表於 : 2006-01-25 21:05
EE_David
論壇版本:phpBB2.0.17
主機空間:竹貓星球


最近在我的論壇改風格,本身只會一點點的html語法(國中學的),
不會用CSS,之前也沒聽過DIV這東西 >< 常常會被表格搞的很亂,
現在裝了一個最新發表主題的mod,但是我怎麼修改都會凸出來,很醜!

請大大幫忙一下,看看我哪裡多表格?或是寫不正確?

我的論壇位置 http://www.dotawo.com

進去第一眼就可以看到那很突兀的方塊!

拜託了...謝謝!(想要自改風格...真是耗時費力阿 :-( )

-EE_David-

發表於 : 2006-01-26 01:28
~倉木麻衣~
其實沒必要使用div來做排版吧, 直接用table就好了

另外, 你的問題實在不知道要怎麼說才好\r
直接看圖好了, 底下是用Firefox的Web developer功能所做的檢視(紅線表div)
圖檔
依你的寫法, 一個div就相當於一個table
所以最左邊的那一塊實際上是最外圍table 的一個td
而內部的的div範圍則是外圍table裡的另一個td
你再自行體會一下吧\r
真難表達 (ro01)

發表於 : 2006-01-26 02:18
EE_David
感謝 倉木麻衣 解說

我是打開 INDEX_BODY.TPL 把HTML語法的部分
剪下來用FRONTPAGE編輯 XD

剛剛我去看,版面又齊了,好像是主題數字過長的問題,
我該怎麼設計呢?採用固定像素嗎?
ex: 第五個最新主題。

-EE_David-

發表於 : 2006-01-26 02:43
~倉木麻衣~
EE_David 寫:剛剛我去看,版面又齊了,好像是主題數字過長的問題
嗯, 看起來是有可能\r

如果是這樣, 我會建議你將最外圍那一個table的寬度固定在800試看看
(就跟底下查看誰在線上的table寬度相同)

發表於 : 2006-01-26 22:43
EE_David
我的index_body.tpl語法如下:

代碼: 選擇全部

<table width="650" height="100%" cellpadding="0" cellspacing="0" border="0" align="center">
  <tr>
 <td valign="top">
<table width="650" border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline">
	<tr> 
	  <th align="center" class="thCornerL" width="20%">&nbsp;{L_FORUM}&nbsp;</th>
	  <th align="center" class="thTop" width="40%">&nbsp;{L_TOPICS}&nbsp;</th>
	  <th align="center" class="thTop" nowrap>&nbsp;&nbsp;{L_AUTHOR}&nbsp;&nbsp;</th>
	  <th align="center" class="thTop" nowrap>&nbsp;{L_REPLIES}&nbsp;</th>
	  <th align="center" class="thTop" nowrap>&nbsp;{L_VIEWS}&nbsp;</th>
	  <th align="center" class="thCornerR" nowrap>&nbsp;{L_LASTPOST}&nbsp;</th>
	</tr>
	<!-- BEGIN toprow -->
  <tr>
 <td class="row1" nowrap><span class="forumlink"><a href="{toprow.FORUM_URL}" target="_top" class="forumlink">{toprow.FORUM_NAME}</a></span></td> 
 <td class="row2" nowrap><span class="topictitle"><a href="{toprow.TOPIC_URL}" target="_top" class="topictitle">{toprow.TOPIC}</a></span></td>
 <td class="row1" align="center" nowrap><span class="name">{toprow.POSTER_URL}</span></td>
 <td class="row2" align="center" nowrap><span class="postdetails">{toprow.TOPIC_REPLIES}</span></td>
 <td class="row1" align="center" nowrap><span class="postdetails">{toprow.TOPIC_VIEWS}</span></td>
 <td class="row2" align="center" nowrap><span class="postdetails">{toprow.POST_TIME}<br />{toprow.REPLIER_URL}&nbsp;<a href="{toprow.LAST_POST_URL}" target="_top"><img src="{ICON_URL}" border="0" alt="{ICON_ALT}" /></a></span></td>  
  </tr>
比較困擾我的是 20% 40%的部分,我不知道該如何修改!

我把它全部丟在寬650裡面的table,但似乎框不住耶?

這該怎麼做呢?

-EE_David-

發表於 : 2006-01-26 23:10
~倉木麻衣~
主要原因在於版面或主題部份用了nowrap
<!-- BEGIN toprow -->
<tr>
<td class="row1" nowrap><span class="forumlink"><a href="{toprow.FORUM_URL}" target="_top" class="forumlink">{toprow.FORUM_NAME}</a></span></td>
<td class="row2" nowrap><span class="topictitle"><a href="{toprow.TOPIC_URL}" target="_top" class="topictitle">{toprow.TOPIC}</a></span></td>
所以Top 5的部份若有版面名稱或主題長度將不理會<th>裡的20%及40%設定, 所以會爆表

發表於 : 2006-01-26 23:53
EE_David
感激喔...我把nowrap刪掉,就ok了!

謝謝喔... :-D

請問 nowrap 代表什麼意思呢? 不斷行?

發表於 : 2006-01-26 23:59
~倉木麻衣~
EE_David 寫:請問 nowrap 代表什麼意思呢? 不斷行?
yes
或說是內文超過設定寬度也不自動換行

發表於 : 2006-03-16 12:56
orga
我的版面也似乎和Table的修改有點關係,所以選擇在這回覆 :oops:

一進首頁就變的好大~都要使用左右捲軸,很不方便

難道不能自動針對使用者的解析度做更動

請問我的問題出在哪ㄦ阿!感謝大大喔

我的版本是2.0.18

問題首頁:
http://www.quake.idv.tw/phpbb2/