How to enforce a min-width for a page (css)


Tags: html,css

Problem :

I've got a site designed for desktop and tablet, and it looks good on tablet.

Mobile wasn't entirely neglected (bootstrap was used, so it is at least bearable) but that wasn't the focus.

Needless to say, some pages don't look that great on mobile. Rather than restructure it all, when virtually nobody will ever access this on a mobile, I'd rather just put a min-width on the page and accept when the occasional mobile user browses to it they'll have a horizontal scroll bar.

What CSS do I need to enforce a minimum width (of about 450px) for an entire page?

Thanks



Solution :

Don't know the structure of your CSS and HTML, but did you tried

html,body
{
   min-width: 700px;
   width: 100%;
}

    CSS Howto..

    How to hide one table and show another in nice animated way?

    How do I conclude the right directory path when including in CSS/JS/HTML?

    HTML: how to make 2 tables with different CSS [closed]

    how to make an image “coming” to foreground

    How to share common css and other resources among grails projects?

    How do I apply CSS rules from a local domain to content in an iFrame from another domain

    How to make IFrame fill width of screen

    How to increase spacing between dt tags

    How to get div columns to be same height?

    how to disable the highlighting view on selection either in html or css?

    How do you extend a Django project root HTML file in project apps?

    How to write this :not “in other element” CSS rule?

    How to center an overflowing image inside of a constraining div

    How to center a image with transparent background in css?

    How to use sprite image in css?

    How to create square around glyphicon bootstrap?

    Show/Hide elements in a table

    How to build a CSS template from scratch

    How can I change the ckeditor iframe CSS styling

    How to include the PHP file that is outside the folder where main PHP file exists?

    Ext JS 4.2 - How to create a header like the one at KitchenSink sample?

    How to line up images horizontally and center with css when using a premade javascript magnifying glass?

    How to give equal width for all the fields in the form with validations?

    How to get conditional css to work on Blogger/Blogspot?

    jQuery Mobile - How to change the css classes to be applied when i use a data-attribute?

    How to include button text and links as part of css

    How to give outer glow effect to column in HTML/CSS?

    My jquery slideshow is not functioning properly

    How can I add a CSS class to a page with jquery?

    How to make a split screen video with full height?