携帯HTML

■背景色を設定したい

<?xml version="1.0" encoding="Shift_JIS"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<head>
<title>携帯 xhtml テスト</title>
<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS" />
</head>
<body>
<div style="color:#FFFFFF; background-color:#00A0E9; text-align:center; font-size:small;"><font size="1">てすと</font></div>
<div style="text-align:left; font-size:small;"><font size="1">テストで〜す</font></div>
<hr style="border-color:#00A0E9; background-color:#00A0E9; border-style:solid; color:#00A0E9; height:3;" size="3"/>
<div style="color:#FFFFFF; background-color:#00A0E9; text-align:center; font-size:small;"><font size="1">(C)ふった</font></div>
</body>
</html>


▼ポイント
●文字が書かれている領域の背景に色をつける。および文字の大きさを指定する場合。

DoCoMoはstyleだけでよいが、auSoftBankは文字の大きさを指定するためにfontタグを併用する必要がある。

てすと

●水平線を引く場合

・「border-style:solid;」を指定する必要がある。
・3キャリアに対応させるために「height:3;」と「size="3"」を同時に指定する必要がある。