Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best practice on setting page width and margin
Message
 
 
À
07/04/2014 05:18:19
Information générale
Forum:
HTML5
Catégorie:
Autre
Divers
Thread ID:
01598111
Message ID:
01598148
Vues:
29
>>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 ?
>

My question probably was not clear. I am not concerned about the bottom margin but rather the left margin of the page. And as I mentioned to Mike, I found that setting of margin: 30px works on large desktops. Which gives enough space on the left from the edge of the browser to the page content. And as far as restricting the width of the page, I now set it to auto. Which also works on large devices and small devices. Today I am going to be looking for an emulator for iPad/iPhone to install on my computer. This will give me more ways of checking the look and feel.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform