Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. $(function(){
  2. var grid = $(window).height();
  3. var gridFinal = grid - 140;
  4. $('.grid').css({'min-height': ((gridFinal))+'px'});
  5. });
  6.  
  7. window.onload = getIDHeight;
  8.  
  9. function getIDHeight() {
  10. var myHomeHeight = document.getElementById("home").offsetHeight;
  11. document.getElementById("home-services").style.height = myHomeHeight - 15 +"px";
  12. }
  13.  
  14.  
  15. window.addEventListener('load', function (){
  16.  
  17. var myNewsHeight = document.getElementById("blog").offsetHeight;
  18. document.getElementById("social-media").style.height = myNewsHeight - 15 +"px";
  19. });
  20.  
  21. window.addEventListener('load', function (){
  22.  
  23. var myAboutHeight = document.getElementById("references").offsetHeight;
  24. document.getElementById("about").style.height = myAboutHeight - 25 +"px";
  25. });
  26.  
  27. window.addEventListener('load', function (){
  28.  
  29. var myServicesHeight = document.getElementById("services").offsetHeight;
  30. document.getElementById("guidelines").style.height = myServicesHeight - 15 +"px";
  31. });
  32.  
  33. window.addEventListener('load', function (){
  34.  
  35. var myTipsHeight = document.getElementById("tips").offsetHeight;
  36. document.getElementById("recommendations").style.height = myTipsHeight - 20 +"px";
  37. });
  38.  
  39. window.addEventListener('load', function (){
  40.  
  41. var myContactHeight = document.getElementById("contact-info").offsetHeight;
  42. document.getElementById("email").style.height = myContactHeight - 15 +"px";
  43. });
  44.  
  45. html,body{
  46. height:100%;
  47. }
  48. #column1{
  49. height:100%;
  50. }
  51. #column2{
  52. height:100%;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement