On my website, I have a position:fixed
<div>
that appears in the center of the screen. Whenever there are messages, a second position:fixed
<div>
is displayed next to the first one.
I've noticed that on various screen sizes, like a netbook with a small screen, the two <div>
's overlap each other.
Is there a way to keep their positions fixed relative to each other? I attempted using a fixed container to house both elements, but they still shifted around.
<div id="container">
<div id="container"></div>
<div id="container"></div>
</div>
UPDATE:
<div id="wrapper">
<div id="container1"></div>
<div id="container2"></div>
</div>
In the CSS code provided above, container1 and container2 continued to move when adjusting the screen size.
#wrapper {
position: fixed
}
#container1 {
position: fixed
}
#container2 {
position: fixed
}
Do I need to employ relative positioning on the container 1/2 <div>
s?