O4A CSS Sample

1. Create a file index.php

<html>
<body>

<link rel=”stylesheet” type=”text/css” href=”style.css” media=”screen” />

<div id=”wrapper”>

 <div id=”page”>

  <div id=”header”>
   <h1>I am but a fool.</h1>

   <p>I didn’t know PHP is this easy.</p>
  </div>

 </div>
</div>
</body>
</html>
2. Create another file style.css

<style type=”text/css”>

body  {
 color:#333;
 background:#EEE;
 text-align:center;
}

h1 {
 color:#222;
}

#wrapper {       
 margin: 0 auto;
 width: 960px;
 text-align:left;
}

#page {
 width: 960px;
 background-color: #DDD;
 margin: 1px auto;
 border: 2px solid #00CC00;
}

#header {
 padding: 10px;
}

</style>

Leave a Reply