I know its possible a web game (travian) does it. what I'm trying to do is have a div of say 800 width that does 2 things:
First: if browser is more than 800 pixels wide the dive centers itself in the browser (this I have figured out)
Second if I drag my browser window smaller, my div scrolls off the left side of the page. I want it not go past the left side ( 0px) of page when page is smaller than 800.
Travian does it but I can't figure it out so any help would be appreciated.
this centers my box but when resizing browser it cuts off the left side (lets it pan past left edge of browser)
#NavBar {
position: absolute;
width: 425px;
margin:0 -225px 0 -225px;
height: 70px;
z-index: 4;
left: 50%;
min-width: 425px;
top: 15px;
color: white;
}