The other way to position elements is to float them outside of the normal flow of elements. When elements are floated, they remove themselves from their normal position and float to the specified margin. The float property is used to float elements. This property has the following format:
float: right | left | none;If the property is set to right, the element is floated to the right margin. If the property is set to left, the element is floated to the left margin. If the property is set to none, the element maintains its normal position as per the rest of its formatting properties. If the element is floated to a margin, the other elements will wrap around the opposite side of the element. For example, if an element is floated to the right margin, the other elements wrap on the left side of the element. For example, the image is not floated and appears in the normal flow of elements. The same image is floated to the right margin (via the style float: right).
A nonfloated image is rendered where its tag appears.
An image that is floated is removed from the normal flow and is moved to the specified margin (in this case, the right margin), and the other elements wrap on the exposed side of the element.
|
|
HTML Related Tutorials |
|
---|---|
XML Tutorial | HTML 4 Tutorial |
HTML 5 Tutorial | Java Tutorial |
CSS Tutorial | XHTML Tutorial |
HTML Related Interview Questions |
|
---|---|
XML Interview Questions | HTML 4 Interview Questions |
HTML Interview Questions | HTML 5 Interview Questions |
HTML+XHTML Interview Questions | HTML+Javascript Interview Questions |
HTML DOM Interview Questions | Java Interview Questions |
CSS Interview Questions | Java Abstraction Interview Questions |
Dynamic HTML Interview Questions | XHTML Interview Questions |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.