Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should be using responsive web design techniques when creating master pages and/or ContentPlaceHolder controls within master pages. This will address the page-centering issue and the width of your objects. It is also how your example site creates their layout.</p> <h1>How to center your content</h1> <p>As Jonathan Bick mentioned, the most common method for centering your content is by setting the left and right margin to auto on any given div. This can be done with the following:</p> <pre><code>.someClass{margin:0 auto;} </code></pre> <hr> <p><strong>Common mistakes when centering your content</strong></p> <p>Any of the following can stop your content from centering properly:</p> <ul> <li>Forgetting to set the width. <ul> <li>The width of any centered element must be explicitly set. This can be done with either a percentage of the window, by pixels, or any other <em><a href="http://www.w3schools.com/cssref/css_units.asp" rel="nofollow noreferrer">CSS Unit of measurement</a></em>.</li> </ul></li> <li>Placing the div within a container that is set to float left or right. <ul> <li>Doing this will cause the contained div to disregard its width property. Test it <em><a href="http://jsfiddle.net/xp4um/" rel="nofollow noreferrer">here.</a></em></li> </ul></li> </ul> <p><em>Note: These are just off the top of my head so I'll come back and add more as I think of them.</em></p> <hr> <h1>Notes on Responsive Web Design</h1> <p>Responsive web design is used to create a site that auto-adjusts its elements for the best possible layout for the current screen size. The great thing is this can be done purely with CSS and HTML. You can find all you need to get started at the link below...</p> <ul> <li><strong><a href="https://stackoverflow.com/questions/17821033/how-to-make-a-asp-net-drop-down-list-responsive/17821359#17821359">StackOverflow - How to make an ASP.NET drop down list responsive?</a></strong></li> </ul> <p>This should definitely get you pointed in the right direction. That link also has references to some excellent tutorials I have in my "Responsive Design" folder in my bookmarks.</p> <hr> <h1>Using Google Chrome's "Inspect element"</h1> <p>Google Chrome (as well as most other browsers) has a tool called <em>Inspect element</em>. When you right click on an element in a web-site, at the bottom of the context menu you will see the <em>Inspect element</em> option. Clicking on this will pull up a tool that analyses the properties of any rendered element, and displays them with color-coding, images, labeling, etc. The tool is excellent and may help you identify why your image is not centering...</p> <p><img src="https://i.stack.imgur.com/tDoB9.png" alt="Inspect element example 1"></p> <p>Here you can see what happens when I inspect the logo of Stack Overflow. </p> <p><strong>Furthermore...</strong></p> <p>You can use the styles window (at the bottom right of the <em>Elements</em> panel) to quickly test out new styles.</p> <p><img src="https://i.stack.imgur.com/H23by.png" alt="Inspect element example 2"></p> <p>Notice that I changed the border of the logo in the styles section to <code>solid 20px red</code> and the new style is reflected in the browser window. This, of course, is only temporary so you need not worry about accidentally breaking your code.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload