CSS vertical centering split background image not overlapping
Posted
by user295292
on Stack Overflow
See other posts from Stack Overflow
or by user295292
Published on 2010-03-17T01:34:16Z
Indexed on
2010/03/17
1:51 UTC
Read the original article
Hit count: 414
is it possible to split 2 images vertically and when resizing the browser, it wont overlap but stay vertically centered?
can the left image stay fixed so the right side of it won't cut off(overlap)
this is what i have now, but when resizing the browser smaller, it pushes the left image underneath the right. rather have the images cut off on the outer sides and never overlap each other in the middle, make sense?
#wrapper {
width:1680px;
max-width:1680px;
height:500px;
margin: 0 auto;
}
#left-image {
width: 50%;
position:absolute;
left: auto;
height:500px;
}
#right-image {
width: 50%;
position:absolute;
right: 0px;
height:500px;
}
© Stack Overflow or respective owner