2
I have two divs
on my page, a class="rodape"
and another class="content"
.
The first is the footer of the page, and adjusts its position relative to the bottom
of the fixed contents of the page without problems.
However, the second div
loads dynamic content (via a check in Javascript
, displayed at the end of the question). If the content is of equal height or less than the fixed content, no problem. But, if it is larger, the div
ropadé does not move according.
Follows excerpt from css
for each element:
.rodape{
background-color:#013852;
height:380px;
width:100%;
margin-top: 30px;
position:absolute;
}
.content{
display:none;
float: right;
margin-right: 5%;
width:35%;
margin-top: 2px;
padding-left: 5%;
padding-bottom: 20px;
border-left:#CCC solid 1px;
}
To div content
is initially display: none
, because it depends on the action of the video ending beside (left side of the screen has a player) to be displayed:
<script>
var myVideo = document.getElementById("myVideo");
function endFunction() {
myVideo.width = 495;
myVideo.height = 324;
document.getElementById('content').style.display = "inline-block";
}
function playFunction() {
myVideo.width = 720;
myVideo.height = 445;
document.getElementById('content').style.display = "none";
}
</script>
And the table that is displayed is not exactly dynamic (it is inserted in the HTML
initially), but its display depends on a query PHP
, sort of like this:
<?php
switch($r['tipo_resposta']){
case '1': //exibe a tabela
break;
case '2': //exibe um input text
break;
default:
}
?>
why are you using the position Absolute in the footer?
– haykou
@haykou had put Absolute to other pages. In this particular case, I tried to change to relative position, but it made no difference, the problem persisted...
– Atoyansk
if you can put html and css in the example it would be easier, taking position Absolute, and putting a display inline block, with height and width to div . content would increase the size as content.
– haykou
I will add some other information to the question... I saw here that there are more things that are certainly influencing behavior...
– Atoyansk