
Advanced Web Design: Cascading Style Sheets (CSS)
Rational: why is it important for me to learn CSS?
Style sheets allow you to more effeciently control the layout and formatting of your web site. Wholesale changes to your site are simplified and can be done more quickly. Redundant code can be eliminated which reduces file size and loading time. A web designer worth his salt ought to know CSS. However, CSS isn't necessarily the right fit for all clients because there are inconsistencies between browsers and older browsers do not recognize them. There are two basic types of style sheets: internal and external. The internal style sheets control the formatting and layout of a single page (the page on which they are residing between the Head tags). An external stlye sheet is a separate document and it is referenced from other web pages. There is actually a third type of Styles, In line Styles, that can be used to control formatting of a particular portion of a web document. You are expected to learn and demonstrate mastery of only the internal and external stlyes.
Challenges:
- Research and develop an internal stlye sheet to control the formatting and layout of a single page in your in your client's site or your personal web site.
- Research and develop an external or separate stlye sheet document that controls the formatting and layout of an entire web site.
Style elements to control using CSS:
- Demonstrate the ability to create a class.
- Hide the sheet from older browsers.
- Use two text colors.
- Change text alignment
- Bold or Italicize
- Font. Show three font option in case viewers/browsers don't have one of the fonts you specify.
- Font size (at least two).
- Two text colors.
- Add a background.
- Another tricky application of CSS that will impress your peers, win friends, and earn an A grade for this unit is using CSS for positioning elements on a page. You may find this article on Webmonkey very helpful, "Introduction to CSS Positioning". For an A grade on this unit, successfully include elements (either text or images) positioned using these techniques:
- an element positioned relatively
- an element positioned absolutely
- the Z-index to make two or more elements share the same space (in the same manner as layers)
Resources:
- Casto's HTML 4
- Maran's Creating Web Pages with HTML Simplified
- Weinmans' Designing Web Graphics.3, pp. 305-320
- Sitepoint.com
The actual article is "CSS is Easy" by Kevin Yank.
- Webmonkey.com
Several articles on style sheets. A hint for the savy coders that thought to read this entire assignment: some advanced tricks can be found at this site.
- WebReview's Style Sheet Tutorials