User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 425,983 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,639 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 5931 | Replies: 12
Reply
Join Date: Mar 2005
Posts: 13
Reputation: mark25787 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
mark25787 mark25787 is offline Offline
Newbie Poster

Making web site fill browser screen

  #1  
Apr 4th, 2005
Hi,
I'm modifying a template using Dreamweaver that I downloaded from the web and I would like it to check the browser resolution and resize accordingly.
It was designed at 1024x768 and looks OK at that resolution, but is someone is running 1280x1024 it is small on the screen.
Does anyone know how I can do this? I am using CSS so if someone can tell me if it is something I change in the CSS file or the .dwt template, then I can post the code and hopefully someone can assist? Unfortunately, I am not very au fait with CSS and am just learning how to modify rather than write

Thanks
Mark
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 108
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Making web site fill browser screen

  #2  
Apr 4th, 2005
you could try checking out this code:

<SCRIPT language="JavaScript">
<!--
if ((screen.width>=1024) && (screen.height>=768))
{
 window.location="highres.html";
}
else
{
  window.location="lowres.html";
}
//-->
</SCRIPT>
Reply With Quote  
Join Date: Mar 2005
Posts: 13
Reputation: mark25787 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
mark25787 mark25787 is offline Offline
Newbie Poster

Re: Making web site fill browser screen

  #3  
Apr 4th, 2005
Does that mean having 2 copies of the website, one in hi-res mode and one in low-res mode? It is a fairly large website covering property sales and rentals so would like the convenience of as few updates as possible.
Reply With Quote  
Join Date: Dec 2004
Location: Lincoln Park, Michigan
Posts: 1,744
Reputation: Comatose is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 108
Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Moderator

Re: Making web site fill browser screen

  #4  
Apr 4th, 2005
that script would require 2 pages, yes, but it's simple to change window.location="highres.html"; to whatever you want to actually do in the event that res is set to whatever resolution we have.... this is just an example of how to check for the resolution.
Reply With Quote  
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Making web site fill browser screen

  #5  
Apr 4th, 2005
As another idea, look at the DOM properties for "screen.width" and "screen.height". Based upon those, you could use JavaScript to change the size of your window. The content should be structured either to resize automatically (use percentages, floats, etc. for your elements' size and position), or to stay centered.
Reply With Quote  
Join Date: Jul 2004
Location: Wales
Posts: 735
Reputation: DaveSW is on a distinguished road 
Rep Power: 6
Solved Threads: 17
DaveSW's Avatar
DaveSW DaveSW is offline Offline
Master Poster

Re: Making web site fill browser screen

  #6  
Apr 4th, 2005
If you post a link to a page with the template applied, or a zip of the template applied, maybe one of us can suggest something - the ability to expand and fill the screen depends on the design itself.
Reply With Quote  
Join Date: Mar 2005
Posts: 13
Reputation: mark25787 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
mark25787 mark25787 is offline Offline
Newbie Poster

Re: Making web site fill browser screen

  #7  
Apr 5th, 2005
Hi,

This is the link where I downloaded the template from:

http://www.r7designer.com/downloads/details.php?id=7

The template is good, apart from the fact that it won't adjust to screens with different resolutions (1025x768 and 1280x1024 are the ones I'm catering for).

Any advice on how to make it auto-adjust would be appreciated.

Thanks.
Reply With Quote  
Join Date: Jul 2004
Location: Wales
Posts: 735
Reputation: DaveSW is on a distinguished road 
Rep Power: 6
Solved Threads: 17
DaveSW's Avatar
DaveSW DaveSW is offline Offline
Master Poster

Re: Making web site fill browser screen

  #8  
Apr 5th, 2005
I handcode all my stuff in a text editor, so the dreamweaver template isn't much use to me...
Could you create a page, zip it and send it to me?
Reply With Quote  
Join Date: Mar 2005
Posts: 13
Reputation: mark25787 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
mark25787 mark25787 is offline Offline
Newbie Poster

Re: Making web site fill browser screen

  #9  
Apr 5th, 2005
This is the first few pages of the site that I have uploaded. The pages that work are the 4 below "Property Sales"...

http://www.lamanga-soluciones.com/Ne...ment_Sales.htm

Thanks
Mark
Reply With Quote  
Join Date: Jul 2004
Location: Wales
Posts: 735
Reputation: DaveSW is on a distinguished road 
Rep Power: 6
Solved Threads: 17
DaveSW's Avatar
DaveSW DaveSW is offline Offline
Master Poster

Re: Making web site fill browser screen

  #10  
Apr 5th, 2005
Hi Mark
I've had a look at it, and I can expand the headers, footers, right tabs etc, but I can't get the main content area to expand.
Basically it's been designed with too many tables, and everything is absolutely positioned from the top right. This means you can't set widths easily on it.
I'll zip up what I've got if you like, but it's an awkward one to do.

The only real way to make it an expanding layout would be to rebuild it from the ground up.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:38 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC