I have a bit of an issue on my website. On my website's pages, there is a section that changes position for no reason when the page is refreshed. It doesn't move when I simply click on the URL from the menu, or just type it again in the address bar of my browser.
I tried using overflow-y on the html and body tag, but it didn't help with the issue. Here's what it usually looks like:
And here's what it looks like when the page is refreshed:
As you can see, on page refresh, this section gets lower and is hidden behind the content of the page.
Here's the code of this section :
HTML/PHP
<div id="topBar">
<h4>Cegep Network : <?php echo $_SESSION['school']; ?></h4>
<a href="disconnect.php"><div id="topBarDisconnect"></div></a>
<div id="topBarUser">
<h5><?php echo $_SESSION['firstName'] . " " . $_SESSION['lastName']; ?></h5><br />
<p><?php echo "Le " . $day . " " . date('j') . " " . $month . date(' Y'); ?></p>
</div>
</div>
<div id="topBarSpace"></div>
CSS
#topBar
{
height: 43px;
padding-left: 13px;
width: 100%;
position: absolute;
left: 4px;
top: 0;
background-image: url("images/topBar.jpg");
color: white;
}
#topBar h4
{
display: inline-block;
margin-top: 13px;
}
#topBar h5
{
display: inline-block;
margin-top: 6px;
margin-bottom: 0px;
font-size: 11pt;
}
#topBar p
{
font-size: 8pt;
display: inline-block;
margin-top: -5px;
}
#topBarDisconnect
{
width: 80px;
height: 38px;
background-image: url("images/dcButton.png");
float: right;
margin-top: 2px;
margin-right: 44px;
margin-left: 9px;
}
#topBarDisconnect:hover
{
background-image: url("images/dcButtonHover.png");
}
#topBarUser
{
float: right;
text-align: right;
}
#topBarSpace
{
height: 43px;
width: 100%;
}
Hopefully one of you brilliant people knows a solution to this problem! I've looked around, only to find unanswered questions! Thanks in advance!