<!DOCTYPE html><html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><title>Specifying borders and layout in CSS to delineate areas of a Web page while not specifying text and text-background colors</title><link rel="stylesheet" type="text/css" href="../../css/sources.css" class="remove"></link></head><body><h1>Specifying borders and layout in CSS to delineate areas of a Web page while not specifying text and text-background colors</h1><section class="meta"><p class="id">ID: C25</p><p class="technology">Technology: css</p><p class="type">Type: Technique</p></section><section id="applicability"><h2>When to Use</h2>
      <p>Pages that use CSS.</p>
   </section><section id="description"><h2>Description</h2>
      <p>The intent of this technique is to specify borders and layout using CSS and leave text and background colors to render according to the user's browser and/or operating system settings (Please see above note in relation to Safari). This allows users to view the text in the colors they require while maintaining other aspects of the layout and page design such as columns of text, borders around sections or vertical lines between a menu and main content area. It will also prevent some display issues in some browsers when pages contain Javascript pop-up boxes or drop-down menus and have the colors overridden.</p>
      <p>Borders and layout indicators help many people with cognitive disabilities, as does flexibility over the text and background colors. Sometimes these two needs are in conflict when the user has to over-ride the author's color selection of text and background in the browser and the browser also removes the borders and the intended layout. This can mean the page is displayed in a single column with one block of content below the other, which can result in unnecessary whitespace and long lines of text. It can also mean that pop-up boxes gain a transparent background, superimposing the text of the box on the text of the page, and drop-down menus either become transparent or gain a dark-grey background. When a Web author does not specify the colors of any text and background, while specifying border colors and layout, it is possible, in most popular browsers, to change the text and background colors without affecting the other (author-specified) CSS declarations. </p>
   </section><section id="examples"><h2>Examples</h2>
      <section class="example">
         
            <p>A Web page is designed using HTML. CSS is used to specify border colors around discrete areas of the page and to layout the content so that the menu floats to the left of the main content area. Neither the text color nor background is specified. The user sets their own colors in the browser. They can view the page in colors and contrasts that work well for them without disrupting the layout. </p>
         
      </section>
   </section><section id="tests"><h2>Tests</h2>
      <section class="procedure"><h3>Procedure</h3>
         <ol>
            <li>Open the Web page in a browser that allows users to change colors of HTML content. </li>
            <li>
               <p>Change the text, link and background colors in the browser settings so they are different than those currently set in the browser. </p>
               <div class="note">
                  <p>Make sure that you do not select the option that tells the browser to ignore the colors specified in the page.</p>
               </div>
            </li>
            <li>Return to the page and check that it is displaying the page in the new text, link and background colors. </li>
            <li>Check that any borders are still displayed and that the layout is retained. </li>
         </ol>
      </section>
      <section class="results"><h3>Expected Results</h3>
         <ul>
            <li>Checks #3 and Check #4 are true.</li>
         </ul>
      </section>
   </section><section id="related"><h2>Related Techniques</h2><ul>
      <li><a href="../general/G17">G17</a></li>
      <li><a href="../general/G18">G18</a></li>
      <li><a href="../general/G145">G145</a></li>
      <li><a href="../general/G148">G148</a></li>
      <li><a href="../general/G156">G156</a></li>
      <li><a href="../css/C23">C23</a></li>
   </ul></section></body></html>