I have a few Dreamweaver web pages out on the internet and try as I might to get them to fit all resolutions, I find that elements shift left and right with different resolutions. Is there a way to set them to always show centered no matter what the user's resolution is?
Webpage that fits ANY resolution
Array#2
Posted 02 November 2009 - 08:16 PM
Depends on how your layout is set, but this is how I usually do it.
If its a fluid layout you need, to stretch the whole page, you might have to play with it a bit. I've not made a layout of that kind in a long time, so I don't really remember how exactly, but it would have to do with floats and percentage widths that can get complicated when it comes to cross-browser compatibility (thanks to IE of course...).
HTML: <div id="container"> <!-- All my page here --> </div> CSS Rule: div#container{ margin: 0 auto; width: 800px; // Or however big your content needs to be if it isn't to be fully flexible }
If its a fluid layout you need, to stretch the whole page, you might have to play with it a bit. I've not made a layout of that kind in a long time, so I don't really remember how exactly, but it would have to do with floats and percentage widths that can get complicated when it comes to cross-browser compatibility (thanks to IE of course...).