View Single Post
Old 06-06-2003, 09:23 AM   #3 (permalink)
Dave
Upright
 
Location: Within GMT+10
This is my ugly and unreliable solution to the problem at hand. It's main issue is that it doesn't work if your text overflows into more than one line.

Code:
<div style="height: 100px; width: 100px; border: 1px solid rgb(0,0,0); text-align: center; padding: 0; margin: 0;">
  <p style="vertical-align: middle; line-height: 98px; font-size: 12px;">
    Blah blah blah.
  <p>
</div>

This is one of those things that's painful due to the css spec not really defining any property for doing the job. Other than a few faults like this css is a good thing, now if only people would stop using tables for all their positioning.
Dave is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73