|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Vertically aligned text inside a DIV
Is there any way to make some text vertically aligned inside a DIV? Just like you would do inside a cell?
Code:
<table><td valign="middle" height="100">This text is vertically aligned</td></table> Apparently, the vertically-align CSS property only works if it is relative to other DIVs. What I want is some vertically aligned text inside a DIV. Thanks for the help. |
|
#2
|
||||
|
||||
|
The vertical-align property applies only to inline elements in relation to the containing line box.
Code:
<p>The micron is 1 × 10<span style="vertical-align: super; font-size: smaller;">−6</span> meters.</p> or <p>This line has an image here <img src="" style="vertical-align: middle;" /> cheers, gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing. My html and css workshop, demos and tutorials. Ask a better question, get a better answer. |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > Vertically aligned text inside a DIV |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|