In how many ways can we position an HTML element? Or what are the permissible values of the position attribute?
Answer / nashiinformaticssolutions
There are mainly 7 values of position attribute that can be used to position an HTML element:
1. static: Default value. Here the element is positioned according to the normal flow of the document.
2. absolute: Here the element is positioned relative to its parent element. The final position is determined by the values of left, right, top, bottom.
3. fixed: This is similar to absolute except here the elements are positioned relative to the <html> element.
4. relative: Here the element is positioned according to the normal flow of the document and positioned relative to its original/ normal position.
5. initial: This resets the property to its default value.
6. inherit: Here the element inherits or takes the property of its parent.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is namespace example?
What is iframes? Why is recommended to avoid iframes?
What is a Web Worker?
When should I use html5?
What are logical and physical tags in html?
What is html dom?
What is single tag?
What are the limits of the text field size?
What is tag and attribute?
What is innerhtml in jquery?
What is the use of <table> tag?
What is the purpose of HTML5 versus XHTML?