Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best practice on setting page width and margin
Message
De
07/04/2014 05:18:19
 
 
Information générale
Forum:
HTML5
Catégorie:
Autre
Divers
Thread ID:
01598111
Message ID:
01598132
Vues:
38
>I am trying to decide on what to use for "restricting" my web application pages width. First, I am using Bootstrap 3.
>
>In the default Site.css, which is automatically installed by VS 2012 when creating a new ASP.NET project, the class content-wrapper has a rule of max width of 960px. Here is the code:
>
>
>.content-wrapper {
>    margin: 0 auto;
>    max-width: 960px;
>}
>
Maybe move the content-wrapper class to bootstrap - then you can define different values for different screen resolutions ?

>But today many desktops have browsers that allow more than 960px of width (e.g. 1200px). So do you think it is a good practice to follow MS "suggestion" of using only 960px?
>
>Another thing I am thinking of setting is the margin for the body of the page. For example:
>
>
>   body { margin: 30px }
>
>
>Do you think it is a good practice to set the margin for the body of pages? And what would be a good number?

I often have a fixed footer so set the margin so that bottom content doesn't get hidden behind the footer. Other than that don't think it matters too much - but IAC you could define a smaller bottom margin for small devices where real estate is at a premium ?

>TIA for any suggestions.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform