![]() |
|
|||||||
| Graphic Design Blog The Best Graphic Design & Web Design Blog Feeds |
|
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
I will not take credit for the actual documentation. The original documentation comes from my very talented co-worker Jason Larose I figured alot of people could benefit from some of this information. So ill post a section once a week or so for the benefit of the group. Learning CSS Part 1: Basics
HTML/XHTML In order to get a full understanding of how CSS styles HTML, we’ll need to get a basic understanding of HTML and XHTML (Extensible Hypertext Markup Language). The biggest difference between HTML and XHTML is that XHTML is more strict and less forgiving than HTML. For example, in HTML it is okay to write, while in XHTML, it will return an error. Therefore, it is always in best practice to create your HTML in all lowercase tags. Also in XHTML, all tags must be closed. For example: , ,, It is always in best practice to write in XHTML. There are 2 different types of tags: inline and block-level. Inline tags allow multiple instances of that tag to be placed on the same line (a, em, span, strong, img). Block-level elements allow only one instance per line, placing the next tag below the one before it (table, p, h1, div, ul, li, ol). A doctype is also important as it can effect the rendering of the CSS. CSS Syntax/Overview CSS (Cascading Style Sheets) styles the HTML. The syntax for CSS is as follows: selector { property: value; } The selector is the HTML tag, id (#), or class (.) being styled. The styles are stated within curly braces. The property is what is being styled (margin, padding, font-size, etc) and the value] is the value of the property (10px, 100%, #000000). It is always best to end a "property: value;" declaration with a semicolon. This can make or break your styles. An id (#) refers to the identity of the element being styled. I can only be used once per page, therefore, it is best to use it to describe an area of the page ( #wrapper, #header, #footer, #bodyContent ). A class (.) refers to any HTML tag that is receiving special treatment. For example: p.quote, a.externalLink, li.highlighted. While HTML tags can receive more than one class separated by a space, it can only receive one id. Inline, Embedded and External Styles CSS cascades, meaning that an elements' style inherits any style previously called for that element. For example, if there is a style of p { color: #FF0000; } at the top of a CSS file, any call for a styled p after that will inherit the #FF0000 color.
Classitis is a term for the overuse of unnecessary classes on an element. Such as in the example below, where the h1 is the only tag within the div. Heading It is best to directly target the h1. Divitis is a term for the overuse of unnecessary divs in the markup. For example: Heading The adds unnecessary markup to the HTML, when it can just be applied to the h1 CSS style. Font Control Below are style properties used in styling text: Â*
The order being: (font-weight or font-style) font-size/line-height font-family. Read Full Post |
|
|
|
||||
|
Yeah...not sure whats messed up with this feed....
here is the post: Just for Fun - 63 Awesome Computer Case Mods | Outlaw Design Blog - A Graphic Design Blog |
![]() |
|
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Case Studies | PR Design | Web Design Forum Showcase | 7 | 05-05-2008 12:15 AM |
| A Case Of The Computer Cooties | quintana | Off Topic | 1 | 21-04-2008 08:46 PM |
| who are the mods and admins on this site? | Rybo | Off Topic | 24 | 26-11-2007 02:35 PM |
| awesome :D | flick | Web Browsers Forum | 9 | 12-09-2007 10:46 PM |
| Case full of shows | Mirko | Graphic Design Showcase | 2 | 07-09-2007 04:29 PM |