Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to fit the Sharepoint Sites fit to browser size?

Posted on 2009-07-07
2
Medium Priority
?
966 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
1 Comment
 
LVL 17

Accepted Solution

by:
GreatGerm earned 2000 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

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

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

We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

782 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