In how many ways can we position an HTML element? Or what are the permissible values of the position attribute?
Answer Posted / 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 |
Post New Answer View All Answers
Why does not table width=100% use the full browser width?
What is doctype & why it is important?
How do I specify page breaks in html?
Do I have to memorize a bunch of tags?
How we can create multi colored text in a webpage?
What is the current version of html?
What is an opening tag?
How do you use a href?
What is an empty tag in html?
What is html5 geolocation?
What is the purpose of ? Explain
Is html client side?
What is difference between html5 and html4?
Is html worth learning?
What is the use of Canvas Element in HTML5?