I have a dropdown div that it have a open/hide button, I want to transform: translateY(-280px); the div for slide-up.

the problem is in different devices, transform: translateY(-280px); is different! and sometime it does not rise completely, and half of div is shown!!

how can I slide up div completely in any other devices?
css :
.slideUp {
-webkit-transform: translateY(-280px);
transform: translateY(-280px);
transition: transform 0.5s ease-out;
}
.slideDown {
-webkit-transform: translateY(0);
transform: translateY(0);
transition: transform 0.5s ease-out;
}
javascript:
$('#arrow-down').click(function() {
header.classList.remove("slideUp");
header.classList.add("slideDown");
$('#arrow-down').css('display', 'none');
$('#arrow-up').css('display', 'block');
});
$('#arrow-up').click(function() {
header.classList.remove("slideDown");
header.classList.add("slideUp");
$("#arrow-up").css("display", "none");
$("#arrow-down").css("display", "block");
});
The below way of dropdown works with all screen sizes, you can change it to open on click and not hover.