CSS Introduction

(Difference between revisions)
Jump to: navigation, search
(Created page with "__NOTOC__ The following is a brief introduction to CSS. If you're new to HTML & CSS, please visit our recommended links for more information. <div class="exchange-home-list">...")
 
Line 52: Line 52:
 
*Colors and Typography
 
*Colors and Typography
 
*Other
 
*Other
 +
 +
 +
 +
<br />
 +
[[:Builder_Test|← Back to Builder Codex Home]]

Revision as of 17:10, July 17, 2013


The following is a brief introduction to CSS. If you're new to HTML & CSS, please visit our recommended links for more information.

Selectors

Selectors are used to target which HTML element to style. Properties and values are used to set the style rules.

There are three kinds of selectors:

Selector Description Example
Tag An HTML tag such as h1 or p. h1
Class A class attribute of one or more elements, such as <p class="class-name">Sample text</p>. Referenced in CSS with a “.” before it. .class-name
ID An id attribute of a unique element; should only be used once, such as <div id="header">Sample header</div>. Referenced in CSS with a “#” before it. #header

Order of Importance

ID selectors are more important than class selectors, and class selectors are more important than HTML tag selectors. More specific selectors get applied before less specific ones. HTML elements that are the innermost ones are the most specific.

CSS& Ordering of Styles

The baseline for ordering CSS style:

  • Display
  • Positioning
  • Box model
  • Colors and Typography
  • Other



← Back to Builder Codex Home

Personal tools
Namespaces
Variants
Actions
iThemes Codex
Codex Navigation
Toolbox