Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Vertical-align

  1. #1
    New Coder
    Join Date
    Dec 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Vertical-align

    Hi all,

    is there any working alternate attribute for vertical-align. i have div tag of 50px height and inside it there is 1 word. i need to vertically align it in middle.

    vertical-align:middle is not working.

    thanks & regards,
    Kalloo

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    vertical-align only works on inline elements. A div is a block level element. Try using this instead.
    Code:
    line-height:50px;

  • #3
    New Coder
    Join Date
    Dec 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, nice idea !


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •