topical media & game development

talk show tell print

professional-xml-03-CSSPlay-internalCSS.htm / htm



  <?xml-stylesheet href="#internalStyle" type="text/css"?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
      <title>Title</title>
      <style type="text/css" id="internalStyle">
        <[CDATA[
          body {
            margin: 0;
            padding: 0;
            border: 0;
            text-align: center;
            color: #554;
            background: #692 url(http://www.example.com/graphic.gif) top center repeat-y;
            font: small tahoma, "Bitstream Vera Sans", "Trebuchet MS", "Lucida Grande", lucida, helvetica, sans-serif;
          }
  
          #main {
            width: 400px;
            float: left;
          }
  
          #sidebar ul li {
            list-style: disc url(http://www.example.com/myBullet.gif) inside;
            vertical-align: top;
            padding: 0;
            margin: 0;
          }
  
          .content-body {
            line-height: 140%;
          } 
  
          h3.content-title {
            margin-top: 5px;
            font-size: medium;
          }
  
        ]]>
      </style>
    </head>
  
    <body>
      <div id="main">
        <h3 class="content-title">Some Title</h3>
        <div class="content-body">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</div>
      </div>
  
      <div id="sidebar">
        <h2>List Title</h2>
        <ul>
          <li><a href='http://www.example.com/someLink'>Item 1</a></li>
          <li><a href='http://www.example.com/someOtherLink'>Item 2</a></li>
        </ul>
      </div>
    </body>
  </html>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.