Website developed for "normal" sized monitors get messed in widescreen
I created a website that works quite nice but later went over to a friend's house and the website was disproportioned and almost hideous on his widescreen monitor. Without extensive rewriting of the website, is there perhaps a script that resizes my website for those on widescre开发者_如何学JAVAen monitors, or other alternatives? Any suggestions besides "redo your website properly" welcome. Thanks!
EDIT: Here is how my website should look like: http://img843.imageshack.us/img843/4453/22425853.jpg
Here's how it appears on widescreen: http://img851.imageshack.us/img851/7494/racism.jpgIt depends on how you did the layout. If you did not use absolute or fixed positiong, the simplest way could be to use a wrapper div around your content and give it a maximum width, like this
<body>
<div id="wrapper">
<!-- all the content goes here -->
</div>
</body>
and the CSS
#wrapper {
max-width: 960px;
margin: 0 auto
}
EDIT: If you do not have access to the HTML you can leave the CSS as shown and use this jQuery line (it should work but I have not tested it)
$('body').wrapInner('<div id="wrapper" />')
EDIT: I see you are not familiar with jQuery. Code that should be run only when the page is ready should be wrapped as follows:
$(function() {
$('body').wrapInner('<div id="wrapper" />');
});
Please let me know if that works for you. You can try
$('#wrapper').attr('id');
in the Firebug console to check that the wrapper div has been created.
Set a max-width
in your css on the wrapper of the site.
精彩评论