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.
Best How To :
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.