Primefaces panel width auto fit browser - jsf-2

I'm doing project in primefaces. In primefaces how content based panel has to fixed.
<p:panel>
........
</p:panel>
Css:
.ui-panel{width:-moz-fit-content}
It will work in mozila browser only. if any style will common support all browser or any other inbuild style in primefaces.
I need panel content based width fixed automatically and avoid unwanted space.

Related

dialog box is not scrolling in case of long content

I am working on the phonegap project.
I uses
codova version 3.5.0
jquery mobile version 1.2.1
I have made dialog box with back and ok button using data-role = dialog. It is working fine when content is small. But the dialog box is not scrolling when the content is long.
I have attached images of my problem.
I have set "DisallowOverscroll" to "true" in my config.xml file.
<preference name="DisallowOverscroll" value="true" />
I am not sure this problem is cordova related, your css should handle overflows. That popup is inside a webkit browser in principle right? Your index.html (or whatever main html is) may fit inside the screen but that web page or any popup inside it can have scrolling. In short, you can check for overflow-y and scrolling with css in general.

Turning off ASP MVC resizing

The default template/project that is used for a MVC 4/5 web application re-sizes according to your screen size. If you are on a tablet or phone it will re-size the text/layout when you manually re-size the screen. Is there any easy way to just turn this off or do I have to create a new project with my own css? I would like the template to stay at a fixed width.
Mvc5 templates used bootstrap.
From bootstrap page: How to disable page responsiveness
Omit the viewport mentioned in the CSS docs. In your razor layout remove:
"<meta name="viewport" content="width=device-width, initial-scale=1.0">"
Override the width on the .container for each grid tier with a single width, for example width: 970px !important; Be sure that this comes after the default Bootstrap CSS. You can optionally avoid the !important with media queries or some selector-fu.
If using navbars, remove all navbar collapsing and expanding behavior.
For grid layouts, use .col-xs-* classes in addition to, or in place of, the medium/large ones. Don't worry, the extra-small device grid scales to all resolutions.

jquery mobile 1.3 beta side panel scrollable content

How can I make the side panel content scrollable in case there are many items, without scrolling the content on the main page (in JQM 1.3 Beta)? I am trying to implement this for an application running on both Desktop and Mobile browsers.Have looked everywhere, but cannot find the answer.
I've made a div inside the panel that is scrollable, but this doesn't work on iOS4 and below without 2-finger scrolling (div within div issue in iOS).
Please, visit the following to find the answer to the above question:
JQM 1.3 panel + iscrollview + dynamically loaded
http://forum.jquery.com/topic/jqm-1-3-panel-iscrollview-dynamically-loaded-pages
jquery-mobile-iscrollview
https://github.com/watusi/jquery-mobile-iscrollview
.ui-panel-inner .ui-content myElement {
overflow: scroll;
-webkit-overflow-scrolling: touch;
}
You can make the selector more specific to a given element or just leave the "ui-panel-inner" if you want the whole side panel to be scrollable.
Note: The "-webkit-overflow-scrolling: touch" adds native inertia scrolling to the overflow and is not needed if all you want is scroll functionality. This should work on webkit browsers; mobile safari and chrome. But I have only tested it on mobile safari. It will not work on mobile IE but again, I have not tested it.

Why are JQuery UI widgets noticeably bigger in Opera?

So I did a test of the actual size (width and height) of the jquery UI combobox button on the JQuery demo page in Opera 12, IE9, and Firefox 15 to see if it was a zoom thing or something else.
Turns out the button sizes were actually different for the Opera browser and much bigger.
Opera width/height: 30px / 25px;
IE width/height: 24.2px / 19.37px;
Firefox: 24.2px / 19.6px;
Why is that? I don't want huge JQuery controls when viewing in Opera. This is only for the JQuery controls too as the other controls on my page are the same size.
Based on #Nal and #Mystery Man's comments, if I set a default font size at the html and/or body level it to px's or pt's, it fixes the discrepancy. Setting it to any em setting is what was causing the issue since the default was 1em or something. The jquery demo pages just use the default jquery font size setting which is in em's and thus not an aboslute size.

jQuery mobile: why fixed header/footer are not really css fixed?

jQuery mobile: can I do header/footer really css fixed (like css position:fixed)?
To fix header and footer i tried to use jquery-mobile's data-position="fixed"
But it looks like ugly on the phone: when I scroll, it appears, disappears and blinks, hm.. that is not what fixed mean to be in css if set header style to: style="position:fixed;z-index:1000" it looks much better - it just fixed and that is all
Is there a way to do it out of the box?
All your questions why this happens and how to fix it: http://jquerymobile.com/test/docs/toolbars/bars-fixed.html
For archiving:
Known limitations
jQuery Mobile uses dynamically re-positioned toolbars for the fixed header effect because very few mobile browsers support the position:fixed CSS property
True fixed toolbars: touchOverflowEnabled
In order to achieve true fixed toolbars, a browser needs to either support position:fixed or overflow:auto. Fortunately, this support is coming to mobile platforms so we can achieve this with web standards. In jQuery Mobile, we have added a global feature called touchOverflowEnabled that leverages the overflow:auto CSS property on supported platforms like iOS5. When enabled, the framework wraps each page in a container with it's own internal scrolling

Resources