CSS
CSS is a core web language. HTML for structured content and CSS for layout and presentation.
selector {
property:value;
}
CSS selectors CSS-Tricks
CSS selectors
h1 { color:#000; } the heading is black
h6 { color:#666; } subheadings are gray
p { color:#000; } paragraphs are black
chain of contextual selectors: #content ul li a { color:blue; }
a[class="bc"] { color:green; } is known as an attributes selector. this will only select the anchor tags that have a class="bc" attribute.
#bac { background:#ccc url('/img/cool.png') 0 0 no-repeat fixed; }
background-color: #ccc;
background-image: url('/img/cool.png');
background-position: 0 0;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: 0 0; if only one keyword, then second value is "center"
background-position: left top;
background-position: 0% 0%; this is default value
.bac { background:#fff url('/img/grad.png') 0 0 repeat-x; }
.bac { background:transparent url('/img/grad.png') center bottom repeat-y fixed; }