Coding
ドコモのi-modeでxhtmlを対応させる
ドコモだけxhtmlがうまく表示されず、奮闘するはめになりましたので、
忘れないうちにメモとして注意点をいくつか・・・。
■メタのContent-Typeを
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=Shift_JIS" />
と記述。
■ファイル名を「?.html」ではなく「?.xhtml」に変更する。
↑はちょっと・・・という方は
■xhtmlファイルがあるディレクトリに下記のコードが入った「.htaccess」ファイルを置く。
AddType application/xhtml+xml html
■cssを外部リンクにせず、style属性を用いる。
・・・これでもcssが効くものと効かないものが存在します。
i-modeで指定可能なプロパティは以下のとおりです。
'background-color' 'background-image' 'border' 'clear' 'color' 'display'
'float' 'font-size' 'height' 'list-style-type' 'margin' 'text-align'
'text-decoration' 'veatical-align' 'width'
pタグより、1つずつspanタグで指定したほうが的確です。面倒ですが。