質問箱/4540
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
**[[質問箱/4540]] [#z2a3c2c0]
|RIGHT:70|LEFT:410|c
|~カテゴリ||
|~サマリ|表組みの文字をtopにする|
|~バージョン|1.4.7|
|~投稿者|[[yataro]]|
|~状態|完了|
|~投稿日|&new{2009-12-22 (火) 20:31:22};|
***質問 [#x2ee240f]
表(テーブル)の中の文字を上に持っていく方法はありますで...
現時点では改行を使って上に持っていくしかないので、どうに...
|文字列1&br;文字列2&br;文字列3&br;文字列4|文字列1|
となってしまうので、右側の表の文字を上にしたいのです。
***回答 [#f58e6561]
- [[質問箱/3343]] -- &new{2009-12-23 (水) 03:29:24};
- wiki 全体で固定するなら、CSS を設定すればできます。表や...
--485行目あたり
var $rowspan = 1;
var $style; // is array('width'=>, 'align'=>...);
+ var $valign = '';
function TableCell($text, $is_template = FALSE)
{
--490行目あたり
$this->style = $matches = array();
- while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLO...
+ while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLO...
$text, $matches)) {
if ($matches[1]) {
$this->style['align'] = 'text-align:' . strtolower(...
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[3]) {
$name = $matches[2] ? 'background-color' : 'color';
$this->style[$name] = $name . ':' . htmlspecialchar...
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[4]) {
$this->style['size'] = 'font-size:' . htmlspecialch...
- $text = $matches[5];
+ $text = $matches[6];
+ } else if ($matches[5]) {
+ $this->valign = strtolower($matches[5]);
+ $text = $matches[6];
}
}
if ($is_template && is_numeric($text))
$this->style['width'] = 'width:' . $text . 'px;';
--545行目あたり
if ($this->colspan > 1) {
$param .= ' colspan="' . $this->colspan . '"';
unset($this->style['width']);
}
+ if ($this->valign != '') {
+ $param .= ' valign="' . $this->valign . '"';
+ }
if (! empty($this->style))
$param .= ' style="' . join(' ', $this->style) . '"';
-
と改造すれば、TOP:, MIDDLE:, BOTTOM: のルールを追加できる...
- wiki全体ではなく、上記改造の通りで指定したいと思ってい...
- ぱっと見では、それだけだと干渉しないハズなので、追記位...
- ログににとって試したところ、この行でエラーがでていまし...
if (isset($this->valign != '') {
一応何度も見直したのですが、追記位置は大丈夫でした。&br;...
- すみません、おもいっきりゴミがついてます。上のは直しま...
if ($this->valign != '') {
が正しいです。([[isset()>PHP関数:isset]] を開きかけて閉...
- おお、ありがとうございます。文字が上にくるようになりま...
- CSS ファイルの設定を上書きできるstyle 属性版を。&br;lib...
$this->style = $matches = array();
- while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLO...
+ while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLO...
$text, $matches)) {
if ($matches[1]) {
$this->style['align'] = 'text-align:' . strtolower(...
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[3]) {
$name = $matches[2] ? 'background-color' : 'color';
$this->style[$name] = $name . ':' . htmlspecialchar...
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[4]) {
$this->style['size'] = 'font-size:' . htmlspecialch...
- $text = $matches[5];
+ $text = $matches[6];
+ } else if ($matches[5]) {
+ $this->style['valign'] = 'vertical-align:' . strtol...
+ $text = $matches[6];
}
}
if ($is_template && is_numeric($text))
$this->style['width'] = 'width:' . $text . 'px;';
vertical-align をミスタイプしたからテストで失敗していた、...
//#comment
終了行:
**[[質問箱/4540]] [#z2a3c2c0]
|RIGHT:70|LEFT:410|c
|~カテゴリ||
|~サマリ|表組みの文字をtopにする|
|~バージョン|1.4.7|
|~投稿者|[[yataro]]|
|~状態|完了|
|~投稿日|&new{2009-12-22 (火) 20:31:22};|
***質問 [#x2ee240f]
表(テーブル)の中の文字を上に持っていく方法はありますで...
現時点では改行を使って上に持っていくしかないので、どうに...
|文字列1&br;文字列2&br;文字列3&br;文字列4|文字列1|
となってしまうので、右側の表の文字を上にしたいのです。
***回答 [#f58e6561]
- [[質問箱/3343]] -- &new{2009-12-23 (水) 03:29:24};
- wiki 全体で固定するなら、CSS を設定すればできます。表や...
--485行目あたり
var $rowspan = 1;
var $style; // is array('width'=>, 'align'=>...);
+ var $valign = '';
function TableCell($text, $is_template = FALSE)
{
--490行目あたり
$this->style = $matches = array();
- while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLO...
+ while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLO...
$text, $matches)) {
if ($matches[1]) {
$this->style['align'] = 'text-align:' . strtolower(...
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[3]) {
$name = $matches[2] ? 'background-color' : 'color';
$this->style[$name] = $name . ':' . htmlspecialchar...
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[4]) {
$this->style['size'] = 'font-size:' . htmlspecialch...
- $text = $matches[5];
+ $text = $matches[6];
+ } else if ($matches[5]) {
+ $this->valign = strtolower($matches[5]);
+ $text = $matches[6];
}
}
if ($is_template && is_numeric($text))
$this->style['width'] = 'width:' . $text . 'px;';
--545行目あたり
if ($this->colspan > 1) {
$param .= ' colspan="' . $this->colspan . '"';
unset($this->style['width']);
}
+ if ($this->valign != '') {
+ $param .= ' valign="' . $this->valign . '"';
+ }
if (! empty($this->style))
$param .= ' style="' . join(' ', $this->style) . '"';
-
と改造すれば、TOP:, MIDDLE:, BOTTOM: のルールを追加できる...
- wiki全体ではなく、上記改造の通りで指定したいと思ってい...
- ぱっと見では、それだけだと干渉しないハズなので、追記位...
- ログににとって試したところ、この行でエラーがでていまし...
if (isset($this->valign != '') {
一応何度も見直したのですが、追記位置は大丈夫でした。&br;...
- すみません、おもいっきりゴミがついてます。上のは直しま...
if ($this->valign != '') {
が正しいです。([[isset()>PHP関数:isset]] を開きかけて閉...
- おお、ありがとうございます。文字が上にくるようになりま...
- CSS ファイルの設定を上書きできるstyle 属性版を。&br;lib...
$this->style = $matches = array();
- while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLO...
+ while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLO...
$text, $matches)) {
if ($matches[1]) {
$this->style['align'] = 'text-align:' . strtolower(...
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[3]) {
$name = $matches[2] ? 'background-color' : 'color';
$this->style[$name] = $name . ':' . htmlspecialchar...
- $text = $matches[5];
+ $text = $matches[6];
} else if ($matches[4]) {
$this->style['size'] = 'font-size:' . htmlspecialch...
- $text = $matches[5];
+ $text = $matches[6];
+ } else if ($matches[5]) {
+ $this->style['valign'] = 'vertical-align:' . strtol...
+ $text = $matches[6];
}
}
if ($is_template && is_numeric($text))
$this->style['width'] = 'width:' . $text . 'px;';
vertical-align をミスタイプしたからテストで失敗していた、...
//#comment
ページ名: