eg-259:case-studies:1
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eg-259:case-studies:1 [2007/10/15 22:57] – eechris | eg-259:case-studies:1 [2012/02/05 13:29] (current) – [Case Study 1: CSS for Layout] 82.20.153.71 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ~~SLIDESHOW~~ | ||
+ | |||
+ | |||
+ | ====== Case Study: CSS for Layout ====== | ||
+ | |||
+ | **Olde Case-study 1**: Last given on Tuesday 15th February, 2011. | ||
+ | |||
+ | **Lecturer**: | ||
+ | |||
+ | In this case study we shall demonstrate the positioning features of CSS by //theming// a WordPress blog. We will no longer be doing this exercise, instead I have made it and some additional tutorials and resources for WordPress theming available as an optional case study. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Case Study: CSS for Layout ===== | ||
+ | |||
+ | * Before you start you should have installed [[eg-259: | ||
+ | * The introduction to this case-study is based on Chapter 6 of Robert W. Sebasta, // | ||
+ | * The case study itself is the [[eg-259: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Contents of this Case Study ===== | ||
+ | |||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Learning Outcomes ==== | ||
+ | |||
+ | //At the end of this case-study you should be able to answer these questions//: | ||
+ | |||
+ | - What is CSS-P? | ||
+ | - Describe all of the differences between the three possible values of the '' | ||
+ | |||
+ | |||
+ | |||
+ | ===== Introduction: | ||
+ | |||
+ | Web Application " | ||
+ | |||
+ | * CSS-P was released by W3C in 1997 | ||
+ | * Completely supported by IE6 and NS7 | ||
+ | * The position of any element is dictated by the three style properties: '' | ||
+ | * The three possible values of '' | ||
+ | |||
+ | |||
+ | |||
+ | ===== Absolute Positioning ===== | ||
+ | |||
+ | <code html> | ||
+ | < | ||
+ | <!-- absPos.html | ||
+ | Illustrates absolute positioning of elements | ||
+ | --> | ||
+ | <html lang=" | ||
+ | < | ||
+ | <meta chaset=" | ||
+ | < | ||
+ | < | ||
+ | /* A style for a paragraph of text */ | ||
+ | |||
+ | .regtext { | ||
+ | font-family: | ||
+ | font-size: 14pt; | ||
+ | width: 600px | ||
+ | } | ||
+ | /* A style for the text to be absolutely positioned */ | ||
+ | |||
+ | .abstext { | ||
+ | position: absolute; | ||
+ | top: 25px; | ||
+ | left: 50px; | ||
+ | font-family: | ||
+ | font-size: 24pt; | ||
+ | font-style: italic; | ||
+ | letter-spacing: | ||
+ | color: rgb(102, | ||
+ | width: 500px | ||
+ | } | ||
+ | </ | ||
+ | </ | ||
+ | < | ||
+ | <p class = " | ||
+ | Apple is the common name for any tree of the genus Malus, of | ||
+ | the family Rosaceae. Apple trees grow in any of the temperate | ||
+ | areas of the world. Some apple blossoms are white, but most | ||
+ | have stripes or tints of rose. Some apple blossoms are bright | ||
+ | red. Apples have a firm and fleshy structure that grows from | ||
+ | the blossom. The colors of apples range from green to very | ||
+ | dark red. The wood of apple trees is fine-grained and hard. | ||
+ | It is, therefore, good for furniture construction. Apple trees | ||
+ | have been grown for many centuries. They are propagated by | ||
+ | grafting because they do not reproduce themselves. | ||
+ | </p> | ||
+ | <p class = " | ||
+ | APPLES ARE GOOD FOR YOU | ||
+ | </p> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Relative Positioning ===== | ||
+ | |||
+ | <code html> | ||
+ | <p style = " | ||
+ | left: 5px; top: 10px;"> | ||
+ | </ | ||
+ | * If no '' | ||
+ | * But it can be moved later | ||
+ | * If '' | ||
+ | * Example: [[/ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <code html> | ||
+ | < | ||
+ | <!-- relPos.html | ||
+ | Illustrates relative positioning of elements | ||
+ | --> | ||
+ | <html lang=" | ||
+ | < | ||
+ | <meta charset=" | ||
+ | < | ||
+ | </ | ||
+ | <body style = " | ||
+ | <p> | ||
+ | Apples are <span style = | ||
+ | " | ||
+ | font-family: | ||
+ | font-style: italic; color: red;"> | ||
+ | </p> | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Static Positioning ===== | ||
+ | |||
+ | * The default value if position is not specified | ||
+ | * Element is placed as if it had a position value of relative | ||
+ | * But top or left properties cannot initially be set nor changed afterwards | ||
+ | * Element cannot be moved if it is made implicitly or explicitly static! | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Dissection of a WordPress theme ===== | ||
+ | |||
+ | Case-study is by John Godley, //WordPress Theme Guide//, [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | I have prepared a [[eg-259: | ||
+ | |||
+ | ===== An HTML5 Theme ===== | ||
+ | |||
+ | * [[http:// | ||
+ | * Example theme [[http:// | ||
+ | ===== Summary of this Case Study===== | ||
+ | |||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | |||
+ | |||
+ | |||
+ | ===== Learning Outcomes ===== | ||
+ | |||
+ | //At the end of this case-study you should be able to answer these questions//: | ||
+ | |||
+ | - What is CSS-P? | ||
+ | - Describe all of the differences between the three possible values of the position property. | ||
+ | - Expect more to be added to the [[eg-259: | ||
+ | |||
+ | |||
+ | ===== Homework Exercises ===== | ||
+ | |||
+ | - Follow the case-study on your own copy of WordPress. Use the instructions for the fluid layout. | ||
+ | - Style the menu in the three-column style. | ||
+ | - Complete the style makeover. | ||
+ | |||
+ | ===== What's Next? ===== | ||
+ | |||
+ | **Getting Stated with JavaScript** | ||
+ | |||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | * [[eg-259: | ||
+ | |||
+ | |||
+ | [[eg-259: | ||
+ | |||