SPAN要素の固定幅、高さのスタイル指定
SPAN要素を固定領域で確保したい場合のスタイル指定は下記のとおり。
style で display、height、widthを指定する。
とりあえず、対応ブラウザは次で確認。
CSS2 - The display declaration
<html> <head> <title>Span Fixed Style</title> <style type="text/css"> #hoge { display: inline-block; background-color: Orange; height: 10px; width: 30%; } </style> </head> <body> <span id="hoge" /> </body> </html>