CSS Interview Question
Question
a) What are the five possible values for “position”?b) What is the default/initial value for “position”?
c) How does the browser determine where to place positioned elements
d) What are the pros and cons of using absolute positioning?
e) if they are really advanced, ask about IE z-index issues with positioned elements.
Answer
a) Values for position: static, relative, absolute, fixed, inheritb) Static
c) They are placed relative to the next parent element that has absolute or relative value declared
d) Absolutely positioned elements are removed from the document flow. The positioned element does not flow around the content of other elements, nor does their content flow around the positioned element. An absolutely positioned element may overlap other elements, or be overlapped by them.
e) IE treats a position like a z-index reset, so you have to declare position of static on the parent element containing the z-indexed elements to have them responsd to z-index correctly.
Basic Javascript Interview Question
Question:
What is the correct way to include JavaScript into your HTML? Answer:
See Including Javascript in XHTML for answers. Answer Rating:
<a href=”javscript:function()”> – and other incorrect answers
- verbally explains the theory but doesn’t know how to do it
- correct explanation using inline event handlers or inline code
- discusses and knows how to implement javascript event listeners
- Explainst how you include JS within an XHTML document and ensure it validates using CDATA, explains

Post a Comment