Solved

How to fit the Sharepoint Sites fit to browser size?

Posted on 2009-07-07
2
958 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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. …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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