CSS Guide updated april 27 2011.txt

Card Set Information

CSS Guide updated april 27 2011.txt
2011-04-27 12:10:16
css cascading style sheets

basics of css for web development
Show Answers:

  1. what three parts make up css declerations?
    Selector (an html element ususually), property attribute (i.e color, background image, etc...) and value of the property attribute(i.e green, image.png etc...)
  2. How do you end declerations properly?
    using a semi-colon example:

  3. How do you close declerations properly?
    using brackets example:

  4. how do you make a fixed image in css?

  5. What is a background-attachment?
    It is the property that states if background is fixed or scrolls with page contents.
  6. What is the shorthand property for background?
  7. What order does content go in for shorthand property?
    • Background-color
    • Background-image
    • Background-repeat
    • Background-attachment
    • Background-position
  8. What is the background-color property?
    It is was what sets the background color of an element.
  9. What are the three color values used for the background-color decleration?
    • selector
    • {
    • background-color:red;
    • background-color:(r,g,b);
    • background-color:#ffffff;
    • }
  10. what is the background-image?
    It is the image used to define a pages background.
  11. How do you setup the background-image decleration?

    • Selector
    • {background-image:url('image.png');}
  12. What is the syntax for an internal style sheet in head section?
    • <style type="text/css">
    • 'CSS code goes here'
    • </style>
  13. What is backround-position?
    It is what sets the placement of background position on page.
  14. What are the values for background-position?
    • left top;
    • left center;
    • left bottom;
    • right top;
    • right center;
    • right bottom;
    • center top;
    • center center;
    • center bottom;
    • px px; (i.e (x position, y position))
    • % %;
  15. What is the color property?
    It is the property that sets the color of text.
  16. what is the W3 rule if you define the color property?
    If you define the color property you must also define background-color.
  17. what are the options for the text-align property?
    • right;
    • left;
    • justify;
  18. What are the values for text-decoration?
    • none;
    • underline;
    • overline;
    • line-through;
    • blink;
  19. What is text-decoration property used for?
    Used to edit links style as well as regular text decoration.
  20. What is the text-transform used for?
    for changing the case sensitivity of html text.
  21. What are the values for text-transform property?
    • uppercase;
    • lowercase;
    • capitalize;
  22. What are the values for text-indent property?
    50px; (or any number to set pixel indent distance)
  23. What are the values for letter-spacing property?
    px; (negative - or Positive +)
  24. what are the values for line-height property?
  25. What does the direction property control?
    It controls the direction the text is displayed.
  26. What are the values for the direction property?
    • rtl;
    • ltr;
  27. What does the word-spacing property do?
    Sets the distance between words in a sentence.
  28. What are the units involved to set the distance between words with the word-spacing property?
  29. What does the white-space property do?
    it stops text from wrapping when resizing page.
  30. what are the values for white-space property?
    • nowrap; (text never wraps)
    • pre; (text only wraps where you insert line breaks)
    • pre-line; (wraps only when necessary)
    • pre-wrap; (maintained by browser)
  31. What is the vertical-align property do?
    It sets how images are aligned within text.
  32. What are the values for the vertical-align property?
    • text-top; (aligns text with top of image)
    • text-bottom; (aligns text with bottom of image)
  33. What does the CSS font property define?
    Font Family, Size, Boldness and style of text
  34. What does sans-serif mean & what are its benefits?
    It means without and the benefit is the readablility of the text.
  35. What is a generic font family?
    Is a family of similar looking fonts such as (Serif or monospace)
  36. What is a font family?
    It is a a specific font name such as (times new roman etc....)
  37. What are serif fonts?
    Fonts with lines at the end of some characters.
  38. What is a monospace font?
    Is a font with equal space between characters.
  39. What is the Font-family rule for font names longer than one word?
    If longer than one word it must be in quotes. For example: {font-family: "time new roman";}
  40. What is the font-style mostly used for?
    For making text italic: {font-style:italic;}
  41. what are the values for the font-style property?
    italic; oblique; (less supported), normal; (shows text normal)
  42. What is the difference between a absolute font-size vs. relative font-size?
    Absolute font-size is an exact font size like 5px, 10px etc... Relative size is relative to surrrounding elements and users can adjust the size of text in web browser unlike absolute font-size.
  43. What font size measurement should be used to ensure compatability with resizing in web browser?
    16px=em (this is the formula to calculate em for compatibility with internet explorer for resizing fonts)
  44. What is the disadvantage of using only em?
    It doesn't allow resizing in all browser.
  45. What should be done to overcome resizing issue with fonts in all web browsers?
    Use the 100% value for body font-size. example: body{font-size:100%;} then go on as usual for setting other font-size elements using the "em" measurement.