Solved

How to fit the Sharepoint Sites fit to browser size?

Posted on 2009-07-07
2
954 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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now