PDA

View Full Version : browser resizing...



niallmckenna
11-18-2005, 08:11 PM
can anyone help me with a problem I have to do with the resizing of my browser.

I have a web page and when I view it on a 17" monitor it looks to be positioned in the correct way, this is obviously because I designed it using a 17" monitor but when you view the page using a 19" monitor the page is positioned to the left of screen. Are there any scripts I can use that allow the browser to resize depending on the size of the screen?

Twey
11-18-2005, 08:29 PM
You just need to design your page better. Use relative sizes and positions rather than static ones (e.g. 50% instead of 400px).

cadaver
11-23-2005, 07:39 PM
looking to a 17'' or 19'' is not a problem. the main problem of yours is resolution. everyone uses a different resolution for their computer so you should make your site for a simple resolution (like 800x600) then it seem uniformly in all browser. or you should use exact sizes for your website (for ex. you should design your site in a 800 pixels width centered table)

you may also use this script.



<!-- THREE STEPS TO INSTALL RESOLUTION PAGE:

1. Paste the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document
3. Be sure to update the resolution pages to ones on your site -->

<!-- STEP ONE: Copy this code into the BODY of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function redirectPage() {
var url640x480 = "http://www.yoursite.com/640x480";
var url800x600 = "http://www.yoursite.com/800x600";
var url1024x768 = "http://www.yoursite.com/1024x768";
if ((screen.width == 640) && (screen.height == 480))
window.location.href= url640x480;
else if ((screen.width == 800) && (screen.height == 600))
window.location.href= url800x600;
else if ((screen.width == 1024) && (screen.height == 768))
window.location.href= url1024x768;
else window.location.href= url640x480;
}
// End -->
</script>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<center>
<form>
<input type=button value="Enter!" onClick="redirectPage()">
</form>
</center>

<!-- STEP THREE: Don't forget to update the URLs in the code above! -->



<!-- Script Size: 1.29 KB -->


in this script you should make your designs for all resolutions and if someone accesses this page he/she look the page as you want them to look like. not useful i think but you can manage the site for all resolutions if you desgned the site for fullscreen and didn't use relative spaces.

in my opinion you should design your web site for exact table size or relative cell sizes.

Twey
11-23-2005, 07:50 PM
you should make your site for a simple resolution (like 800x600) then it seem uniformly in all browser. or you should use exact sizes for your websiteNonsense. The only adequate solution is to design a site relative to the user's defaults; in other words, using relative sizes such as "%" for block-level elements or "em" for font sizes. Using a script to redirect a browser based on resolution is not an acceptable solution, as you can in no way anticipate every single possible resolution in which your page will be viewed - and that's without even thinking about non-Javascript browsers (which will probably be quite a lot of IE users at the moment, what with the latest IE hole (http://news.zdnet.com/2100-1009_22-5965247.html?tag=nl.e589)).

niallmckenna
11-30-2005, 02:34 PM
Thanks for the help so far. The problem is that as I'm pretty new to web design and self taught, I've probably learnt many bad hadits and I'm sure one of these is the way I layout my page. Using software such as dreamweaver; I tend to use layers, so that I can easily layout my images etc. I also use tables in some circumstances, but I don't start my page with a main table and then split it up into different areas for laying out different pieces of the page or images etc.

I'm also not sure how to go about setting positions to relative. From playing about in dreamweaver I have found that you can set positions using css stylesheets but I've absolutely no experience in this.

What way would you recommend designing a page? Should I begin with a main table and then set everything inside this in other tables or stick to using layers?

Twey
11-30-2005, 05:14 PM
I don't know exactly how Dreamweaver does things, but I strongly suspect that its "layers" aren't literal <layer> tags, and so quite usable. Stick with them. Using tables to lay out a page is sometimes practical, but never tasteful. Unfortunately, as I have no idea about Dreamweaver, I don't know how you'd usually specify the units for the dimensions of an object. I'm sure there ought to be some way, though. If not, abandon Dreamweaver and get another design environment. Notepad works nicely :)

P.S. I'm also self-taught, and didn't even know such things as WYSIWYG web design environments existed until I was fairly proficient :p

mwinter
11-30-2005, 05:50 PM
I don't know exactly how Dreamweaver does things, but I strongly suspect that its "layers" aren't literal <layer> tags, and so quite usable.Dreamweaver's 'layers' are the absolutely-positioned div soup junk that creates fragile layouts. I doubt they have to be, but that's typically the end result.


Stick with them.If the OP is on some sort of deadline, it will be more practical to do just that, but not a long term strategy that I'd ever recommend.


If not, abandon Dreamweaver and get another design environment. Notepad works nicely :)There should be no reason to abandon it completely, but certainly stay clear of its WYSIWYG mode and stick to the editor only.

Mike