Solved

How to fit the Sharepoint Sites fit to browser size?

Posted on 2009-07-07
2
957 Views
Last Modified: 2012-08-13
Originally designed according to specs for a larger monitor, the SharePoint site on smaller screens requires the end user to scroll across in order to see the remainder of the site.
Do you know what code needs to be embedded in order for an entire page to be viewed within any sized monitor?
0
Comment
Question by:waqas105t
2 Comments
 
LVL 17

Accepted Solution

by:
GreatGerm earned 500 total points
ID: 24796156
I'm going to repeat what I said here: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/MS-SharePoint/Q_24525443.html


This is a deceptively difficult undertaking.  

You are on the right track with using the screen.width and screen.height to detect total screen resolution, but this only tells you part of the story.  To get the amount of usable space, based on the current browser window size you will need to also detect for viewport size.  If you have an environment that is all standards compliant browsers or IE7 and late you can simply use the window.innerWidth and window.innerHeight parameters.  If you are on IE6 then you'll have to dig to document.documentElement.clientWidth and document.documentElement.clientHeight.  I can't see you being in a corporate environment and having anything else so I'll stop there.

The next step is figuring out what to do with this information now that you have it. If you just change the size of the window you will still have users scrolling when the viewport size is smaller than the page width so you'll need to change the page code itself on the fly.  Some elements are given specific widths either in-line (meh Microsoft) or in one of the various CSS files. You will need to identify which elements you are using on a page and link your own CSS file while updating the width on the elements that have their values declared inline (since linking a CSS file is higher in the cascade and will not override the inline value). Then you'll need to address the font sizes since you are changing the containers.  Once you figure all that out you will need to add the appropriate code to your masterpage(s), but that doesn't customize the admin pages (the ones that reside in _layouts) and it's not recommended that you do.

If you are still reading this then my recommendation is to not attempt this.  It will be much headache with little gain.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
There is one common problem that all we SharePoint developers share: custom solution deployment. This topic can't be covered fully in this short article, so all I want to do in this one is to review it from a development-to-operations perspectiv…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question