User Tools

Site Tools


eg-259:case-studies:1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eg-259:case-studies:1 [2012/02/05 13:15] – [Case Study 1: CSS for Layout] 82.20.153.71eg-259:case-studies:1 [2012/02/05 13:29] (current) – [Case Study 1: CSS for Layout] 82.20.153.71
Line 15: Line 15:
  
  
-===== Case Study 1: CSS for Layout =====+===== Case Study: CSS for Layout =====
  
   * Before you start you should have installed [[eg-259:practicals:1|XAMPP]] and [[eg-259:practicals:2|WordPress]].   * Before you start you should have installed [[eg-259:practicals:1|XAMPP]] and [[eg-259:practicals:2|WordPress]].
Line 61: Line 61:
  
 <code html> <code html>
-<p style = "position: absolute; +<!DOCTYPE html>
-            left: 50px; top: 100px;"> +
-</code> +
-    * Example 1: [[/eg-259/examples/css-p/absPos.html|absPos.html]] +
- +
----- +
- +
-<code html><?xml version = "1.0" encoding = "utf-8"?> +
-<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.1//EN" +
-  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +
 <!-- absPos.html <!-- absPos.html
-     Illustrates absolute positioning of elements +Illustrates absolute positioning of elements 
-     --> +--> 
-<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang="en">+<html lang="en">
   <head>   <head>
 +    <meta chaset="utf-8" />
     <title> Absolute positioning </title>     <title> Absolute positioning </title>
-    <style type = "text/css"+    <style> 
- +      /* A style for a paragraph of text */
-/* A style for a paragraph of text */ +
- +
-     .regtext {font-family: Times; font-size: 14pt; width: 600px}+
  
-/* A style for the text to be absolutely positioned */+      .regtext { 
 +        font-family: Times; 
 +        font-size: 14pt; 
 +        width: 600px 
 +      } 
 +      /* A style for the text to be absolutely positioned */
  
-     .abstext {position: absolute; top: 25px; left: 50px; +      .abstext { 
-               font-family: Times; font-size: 24pt; +        position: absolute; 
-               font-style: italic; letter-spacing: 1em; +        top: 25px; 
-               color: rgb(102,102,102); width: 500px}+        left: 50px; 
 +        font-family: Times; 
 +        font-size: 24pt; 
 +        font-style: italic; 
 +        letter-spacing: 1em; 
 +        color: rgb(102,102,102); 
 +        width: 500px 
 +      }
     </style>     </style>
   </head>   </head>
Line 104: Line 104:
       have been grown for many centuries. They are propagated by       have been grown for many centuries. They are propagated by
       grafting because they do not reproduce themselves.       grafting because they do not reproduce themselves.
-   </p> +    </p> 
-   <p class = "abstext"> +    <p class = "abstext"> 
-     APPLES ARE GOOD FOR YOU +      APPLES ARE GOOD FOR YOU 
-   </p>+    </p>
   </body>   </body>
 </html> </html>
Line 128: Line 128:
  
 <code html> <code html>
-<?xml version = "1.0" encoding = "utf-8"?> +<!DOCTYPE html>
-<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.1//EN" +
-          "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +
 <!-- relPos.html <!-- relPos.html
-     Illustrates relative positioning of elements+Illustrates relative positioning of elements
 --> -->
-<html xmlns = "http://www.w3.org/1999/xhtml" xml:lang="en">+<html lang="en">
   <head>   <head>
-   <title> Relative positioning </title>+    <meta charset="utf-8" /> 
 +    <title> Relative positioning </title>
   </head>   </head>
   <body style = "font-family: Times; font-size: 24pt;">   <body style = "font-family: Times; font-size: 24pt;">
     <p>     <p>
       Apples are <span style =       Apples are <span style =
-              "position: relative; top: 10px; +      "position: relative; top: 10px; 
-               font-family: Times; font-size: 48pt; +      font-family: Times; font-size: 48pt; 
-               font-style: italic; color: red;"> +      font-style: italic; color: red;"> GOOD </span> for you.
-           GOOD </span> for you.+
     </p>     </p>
   </body>   </body>
 </html> </html>
 +
 </code> </code>
  
eg-259/case-studies/1.1328447734.txt.gz · Last modified: 2012/02/05 13:15 by 82.20.153.71