Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best practice on setting page width and margin
Message
De
06/04/2014 17:07:46
 
 
Information générale
Forum:
HTML5
Catégorie:
Autre
Divers
Thread ID:
01598111
Message ID:
01598117
Vues:
48
>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;
>}
>
>
>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?

Use "margin:auto" to center the content-wrapper.

After looking at facebook and youtube and similar enough, I figure the best is to have a layout for 1200 or more, 1024 or more, and 961 or more. Have a mobilish layout for 960 or less. The 1024 only if your design can really take advantage of it..

The 1200 or more on youtube and facebook generally adds a side bar to the 1024 layout.

I too would be interested in seeing other opinions on the topic.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform