css

Interview Questions and Answers

CSS

Question:
How do I center block-elements with CSS1?
Answer:

There are two ways of centering block level elements:
1. By setting the properties margin-left and margin-right to auto and width to some explicit value:
BODY {width: 30em; background: cyan;}
P {width: 22em; margin-left: auto; margin-right: auto}
In this case, the left and right margins will each be four ems wide, since they equally split up the eight ems left over from (30em

--- >>>

CSS - Questions
1. How do I have a fixed non scrolling background image?
Answer
2. Document Style Semantics and Specification Language "DSSSL"?
Answer
3. How do I eliminate the blue border around linked images?
Answer
4. What are the various style sheets?
Answer
5. How do I make my div 100% height?
Answer
6. How to customize your text boxes.
Answer
7. Why was the decision made to make padding apply outside of the width of a box, rather than inside, which would seem to make more sense?
Answer
8. What is CSS rule ruleset?
Answer
9. Which font names are available on all platforms ?
Answer
10. what is Fixed Background?
Answer
11. What is external Style Sheet? How to link?
Answer
12. What are pseudo classes?
Answer
13. What is CSS3?
Answer
14. What`s the difference between ID and class selector?
Answer
15. Why call the subtended angle a pixel, instead of something else ?
Answer
16. What are pseudo elements?
Answer
17. What are style sheet properties?
Answer
18. How do I center block-elements with CSS1?
Answer
19. How do you include comments in CSS?
Answer
20. Describe ID selector?
Answer
21. Describe pseudo classes in CSS.
Answer
22. Can Style Sheets and HTML stylistic elements be used in the same document?
Answer
23. What is important declaration?
Answer
24. What main useful features of CSS3?
Answer
25. What is a Style Sheet?
Answer
26. How do I have a background image that isnt tiled?
Answer
27. What are inline, block, parent, children, replaced and floating elements?
Answer
28. Which set of definitions, HTML attributes or CSS properties, take precedence?
Answer
29. Why use Style Sheets?
Answer
30. What is latest version, CSS4 or CSS3?
Answer
31. Why do style sheets exist?
Answer
32. What is one auto margin?
Answer
33. Explain in brief about the term CSS.
Answer
34. What is cascade?
Answer
35. How can I specify two different sets of link colors?
Answer
36. How do you override the underlining of hyperlinks?
Answer
37. When is auto different from 0 in margin properties?
Answer
38. Explain inline, embedded and external style sheets.
Answer
39. What is attribute selector?
Answer
40. Why does my content shift to the left on some pages in FF?
Answer
41. How do I place text over an image?
Answer
42. How to use CSS to separate content and design ?
Answer
43. What is Extensible Stylesheet Language "XSL"?
Answer
44. What does the Cascading in Cascading Style Sheets mean?
Answer
45. What is selector?
Answer
46. What is CLASS selector?
Answer
47. What is property?
Answer
48. Tell about hover element in CSS3.
Answer
49. What is parent child selector?
Answer
50. What is inline style? How to link?
Answer