Search This Blog

Thursday, April 7, 2011

This is my 2nd learn


What Are Declaration Blocks?

Declaration Blocks begin with a left curly brace ('{') and end when a matching right curly brace ('}') is reached. Between these braces lie semi-colon separated style declarations. 

A style declaration consists of a simple assignment: a CSS property is given a specific value. This is the heart of CSS - the assignment of rendering properties. A CSS property is followed by a colon character (':'), which is followed in turn by a value appropriate to the property. White space around all of these declaration components is optional. 
Syntax: "{" [space]? [Property] [space]? ":" [space]? [Value] [space]? "}"
Example:
font-size: 14pt }



css selector

CSS selectors are the heart and soul of CSS. They define which HTML elements you are going to be manipulating with CSS code and you should have a solid understanding of them when you are finished with this tutorial. Luckily for you, they are pretty simple to comprehend!
  • SELECTOR { PROPERTY: VALUE }
"Property" is the CSS element you wish to manipulate and "VALUE" represents the value of the specified property.
p { PROPERTY: VALUE }
.......................................................................................................................................................

 

declaration:The position declaration lets you declare what the position of an element should be.

This is the test element. It has the following styles:
top: 100px;
left: 100px;
padding: 1em;
border: 1px solid #cc0000;






No comments:

Post a Comment