You can style the background of an element in one declaration with the backgroundproperty.
background: #ffffff url(path_to_image) top left no-repeat fixed;
Values:
attachment
color
image
position
repeat
Or you can set each property individually
Background Attachment
If you are using an image as a background. You can set whether the background scrolls with the page or is fixed when the user scrolls down the page with the background-attachmentproperty
background-attachment: value;
Values:
fixed
scroll
Background Color
You can specifically declare a color for the background of an element using the background-color property.
background-color: value;
Values:
color name
hexadecimal number
RGB color code
transparent
Background Image
You can set an image for the background of an element using the background-imageproperty.
background-image: url(path_to_image);
Values:
url
none
Background Position
You can position an image used for the background of an element using the background-position property.
background-position: value;
Values:
top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x-% y-%
x-pos y-pos
Background Repeat
You can set if an image set as a background of an element is to repeat (across=x and/or down=y) the screen using the background-repeat property.
INTRODUCTION American Tourister is a brand of luggage owned by Samsonite. Sol Koffler founded American Luggage Works in Providence, Rhode Island, USA in either 1932 or 1933.In 1993, American Tourister was acquired by Astrum International, which also owns Samsonite. [3] Astrum was renamed the Samsonite Corporation two years later. Their products include suitcases, backpacks and wallets. All started in 1933, when Sol Koffler put his life savings on the line to start a luggage company in Providence, Rhode Island. His dream was to build a tough suitcase that could sell for a dollar. He succeeded, and decades of innovation followed… By 1945, air travel was taking off and lighter luggage was in high d...
Chapter 2 : CSS Syntax The syntax for CSS is different than that of (X)HTML markup. Though it is not too confusing, once you take a look at it. It consists of only 3 parts. selector { property: value } The selector is the (X)HTML element that you want to style. The property is the actual property title, and the value is the style you apply to that property. Each selector can have multiple properties, and each property within that selector can have independent values. The property and value are separated with a colon and contained within curly brackets. Multiple properties are separated by a semi colon. Multiple values within a property are sperated by commas, and if an individual value contains more than one word you surround it with quotation marks. As shown below. body { background: #eeeeee; font-family: “Trebuchet MS”, Verdana, Arial, serif; } As you can see in the above code I have separated the color from the font-family with a semi-colon, sep...
Chapter 18 : CSS Pseudo Elements The Syntax The syntax for pseudo elements is a bit different than that of regular CSS, but it’s real close. If you have already read chapter 11 then you are slightly ahead of the game. selector: pseudo-element {property: value} As you can see the only difference is that you place the pseudo element after the selector, and divide the 2 with a (:) colon. Or you can assign a class to a pseudo element as follows selector. p :pseudo-element {property: value} Using the above code would style all paragraphs within the declared selector with the pseudo element. The elements: first-line first-letter First Line The first-line pseudo element styles the first line of text in a block level element. p{font-size: small;} p: first-line {font-size: medium; color: #ff0000;} As you can see in the above example paragraphs are set to be a small font size, but the p:first-line is set to be a medium size and a red color. T...