Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Help with Text Baseline
11-03-2011, 03:02 AM #1
- Join Date
- Nov 2011
- Thanked 0 Times in 0 Posts
Help with Text Baseline
Last edited by AAS; 11-03-2011 at 05:06 AM.
11-03-2011, 03:05 AM #2
- Join Date
- Jun 2011
- Thanked 241 Times in 240 Posts
vertical-align only works for inline elements.
in fact vertical-align is not what you think it is
By setting the parent to position: relative;, everything you absolute within it will be relative to the parent. Therefore it will be at the bottom (relatively)Code:<div style="position: relative; width: 300px; height: 300px; border: 1px solid;"> <div style="position: absolute; bottom: 0; width: 100%; height: 10px; background-color: #DDD;"> </div> </div>
You can also you display: inline-block; or display: table; w/ display: table-cell for children to use vertical-align: ; in the way you want to use it, though both have browser support issues (more for display: table)
vertical align alone will be relative to the tallest element within the parent, not really what your looking for in this case
Last edited by Sammy12; 11-03-2011 at 03:10 AM.
Users who have thanked Sammy12 for this post: