html - Aligning text. Using tables or css or  ? -


frequently aligning text such as:

to: 07/02/2010
from: 07/02/2010

id displayed this:

to:   07/02/2010 from: 07/02/2010 

so quickest/easiest/best way this? css? using few nbsp (would work if mono spacing) or using tables. if not in anti-hating table mood, ill use tables.

what recommend?

i'd recommend tables. best way, seeing tabular data there, , html doesn't support tab stops.

but silly avoid tables sake of avoiding tables. unless want option later style so:

to:          from: 07/02/2010   07/02/2010 

you this, if reason didn't want use tables:

css

.sideheading { width: 3em; float: left; } 

html

<div class="sideheading">to:</div>07/02/2010 <div class="sideheading">from:</div>07/02/2010 

or use definition list (but if reason avoiding tables due semantics, dls avoided same thing).

but of course, it's layout, no customer or web surfer ever going care how it, long can read it!


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -