Hello and welcome to our community! Is this your first visit?
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
    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; Jun 5th, 2010 at 09:25 AM.

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

    Use the search facility.

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

  3. #3
    Regular Coder
    Join Date
    Apr 2008
    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