Just wondering if there's some way to force the browser to bring up the horizontal scroll bar. My 开发者_如何学Pythonproblem is that I have some images in a div and they "overflow" out of it when I make the window smaller. I would rather not use the overflow property nor do I want to resize the images.
Thanks in advance,
Matt
Use the CSS3 overflow-x
property to force scroll:
overflow-x: scroll
Tie that into a Javascript onresize callback and you should be all set.
Ahh, I'm such a noob. All I needed to do was add this to my scripts:
$(window).resize(function() {
if($(window).width() <= 1200)
$("body").css("width","1200px");
else
$("body").css("width","100%");
});
This does exactly what I wanted it to do.
Thanks for your help guys.
精彩评论