1 / 29

Design, Formatting, CSS, & Colors

Design, Formatting, CSS, & Colors . September 9, 2010. Design.

gibson
Télécharger la présentation

Design, Formatting, CSS, & Colors

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Design, Formatting, CSS, & Colors • September 9, 2010

  2. Design • “Design is the method of putting form and content together. Design, just as art, has multiple definitions; there is no single definition. Design can be art. Design can be aesthetics. Design is so simple. That’s why it’s so complicated” --Paul Rand

  3. Bad Design... • Bad Design • blinking • moving • ugly colors • pages too big for a normal screen • What’s a normal screen? • browser shots

  4. Examples • A few examples, for fun: • not sure what sort of business this is... • news site • Mr. Bottles...

  5. Good Design... • Mr. Jobs • Mozilla • Charity:Water

  6. Colors -- Paint(Subtractive Color Model) • Primaries: magenta, yellow, and cyan • This color system is called subtractive because: • each primary color absorbs (subtracts) a certain part of the color spectrum. • every time a color is added, less light is reflected. • When you mix all three primaries together, the entire spectrum of color is absorbed, and we’re left with black.

  7. Colors -- Computer ScreenAdditive Color System • Primaries: Red, Blue, Green • Additive color systems start without light (black). • Light sources combine to make a color. • As colors are added, the resulting color is brighter.

  8. Colors • We’ll be working with the additive color system • Mix various amounts of red, green, and blue to create a color. • Colors can be represented by • name • an rgb (dec, dec, dec) value • hexadecimal (# hxhxhx) value.

  9. Colors (ctd) • For RGB, each color is indicated by a number from 0-255 • (0,0,0) = black • #000000 = black • (255,255,255) = white • #FFFFFF = white • These RGB values can be translated into hexadecimal.

  10. What is Hex Anyway? • (15, 100, 128) • RGB to Hex Example...

  11. Hex... #0F6480 • Some tips: • each hex letter/number represents 4 digits in binary • these 4 digits in binary represent some number in decimal • Each two letters/numbers represent red, green, or blue in that order. • Remember your color number!

  12. Helpful Color Links & Advice • Remember your color number! • A list of color names • colorpicker.com

  13. CSS... • CSS is for giving style to your content • HTML: content • CSS: style • CSS Zen Garden

  14. Adding CSS to your HTML • The best (only way for this class!) way to insert CSS to your HTML is by using an External Style Sheet • Define all your styles in one place • Easily change the look of your site • Use the following <link> tag within the <head> tag • Save your external style sheet as a .css file.

  15. What can CSS do? • Style for individual elements • I want tableA to look like this... • I want table B to look like that.... • Style for every element of a certain type • I want all tables to look like this... • I want all menus to look like that... • Style for subclasses of an element • I want theseTables to look like this... • I want thoseTables to look like that... • I want theseMenus to look like this... • I want thoseMenus to look like that...

  16. Syntax • Selector specifies the HTML element to style • Declaration: • always contains a property & value • ends with a semicolon • Property is the style element you want to change, Value is what you are changing the property to.

  17. class Selector • Used to describe a style for a group of elements • Useful for when multiple elements have same style. • Defined with “.” • Allows you to give your styles helpful, memorable names.

  18. class Selector • can also define a class selector for specific HTML elements • Good for clarifying what the style will effect, but not necessary.

  19. id Selector • Used to describe a style for a single, unique element • Defined with a “#” • Can be applied to more than one element, but this is bad practice! • You don’t really have to use this, because you can always use class selector.

  20. Formatting your CSS • Formatting Practices: • some flexibility, but you must be consistent. • always comment your code! • /* someCommentHere */ • curly braces • tab alignment • Bad practices: • multiple attributes on the same line • What does Komodo help you with? • drop downs • formats • syntax errors • .menu li == li.menu

  21. Commonly Used Tags & Properties • full reference sheet

  22. Background

  23. Text • Can be used with any text based html element. [body, div, p, h1, h2, etc.]

  24. Font • Like text styles, this property can be used with any text based element. • If no font is defined, you’ll get the default font. • Don’t forget Browser Shots. • A nice list of fonts & font families

  25. Links • Quick refresher on html links: • <a href = “url”> someLinkText </a>

  26. Links • Link states • a:link -- a normal, unvisited link • a:visited -- a link the user has visited • a:hover -- a link when the user mouses over it • a:active -- a link the moment it is clicked • Note: hover must come after link & visited. active must come after hover. • Styles • can use all text and font styles, plus background color

  27. Tables • Can apply styles to every aspect of a table • the table itself • headers (th) • rows (tr) • cells (td) • table body (tbody)

  28. Table Example • Table Example...

  29. Tables • go into komodo to show them: • collapsable borders • simple borders • line changes • check out last semesters calendar for some examples [black line on two sides, white line on two sides] • headers having different backgrounds, etc. etc.

More Related