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
  1. #1
    New Coder
    Join Date
    May 2010
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Vertical Alignment

    Hi i bought a theme from themeforest.


    I want to vertically align in middle the #silhoutte and #pages , the original developer was unable to do it, he gave me this code as wayaround but it still does'nt work perfectly in diff screen sizes.

    var margin=$(window).height() / 100 * 15;
    $('#pages').css('margin-top',margin + 'px');
    $('#silhouette').css('top',margin + 'px');

    (BTW currently this script is not implemented)

    Is there any wayaround or is anyone here more better coder than the original developer? Please don't give answers like search google for vertical alignment, i already did, but am too confused how to implement if anybody would be kind enough to look in code and guide me on how i can do that i will be thankfull.
    Last edited by subhadeepgayen; 06-05-2010 at 10:25 AM.

  • #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Have a look here. There is much about centre alignment.

    Use the search facility.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #3
    Regular Coder
    Join Date
    Apr 2008
    Posts
    685
    Thanks
    15
    Thanked 105 Times in 104 Posts
    If they have a defined height you can just position it absolute and give it a negative top margin which is half of it's height...

    Otherwise if it's unknown height you can use the display:table solution found here: http://www.jakpsatweb.cz/css/css-ver...-solution.html

    Looks to me as if the picture can be done with the first method but the right column will require the display:table method...


  •  

    Posting Permissions

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