0

I programming very simple layout. It consist 5 div -> http://jsfiddle.net/8tSk6/ . I want that div with ID "kubka" equal 100% - 100px (height: calc(100% - 100px);). Unfortunately, it doesn't work. I try apply tips with CSS3 height: calc(100%) not working (add height = 100%,margin & padding = 0), but script still doesn't work.

Community
  • 1
  • 1
jaksa
  • 853
  • 2
  • 7
  • 10

2 Answers2

0

You could use javascript to get the height of the element and then change it :

function updateHeight(divId){
    var urDiv = document.getElementById(divId);
    urDiv.height = window.innerHeight - 100;
    urDiv.style.height = urDiv.height + "px";
}

Hope it solves your problem.

0

1) you need to add html {height:100%;}

2) remove the spaces between your div and # - what your styles mean is an id of whatever found inside a div and if you look at your www div it is not inside any other div

If you sort these out i think it will work: fiddle

Pete
  • 57,112
  • 28
  • 117
  • 166