I have the following HTML with inline styles.
A quote from extensive reading on the float property:
"Floated elements are taken out of document flow, and other block elements remain in flow, acting as if the floated element is not even there".
Given the above, the image should be positioned at the top left of the page and the the block element <p> should position to the right of the element one line down from the top of the page. However, the block element <p> is forcing a new line above the image element, so that the image and paragraph are positioned at the same height.
Apologies, I am not sure how to include an image of what I expect and what I am getting.
What gets us into trouble is not what we don’t know, its what we know for sure that just ain’t so.
Code:
<img src="../Images/ciap_bg_3.JPG" style="float:left" alt="Ciap" />
<p style="background-color:Fuchsia">Here is the first paragraph</p>
<p style="background-color:green">Here is the second paragraph</p>
A quote from extensive reading on the float property:
"Floated elements are taken out of document flow, and other block elements remain in flow, acting as if the floated element is not even there".
Given the above, the image should be positioned at the top left of the page and the the block element <p> should position to the right of the element one line down from the top of the page. However, the block element <p> is forcing a new line above the image element, so that the image and paragraph are positioned at the same height.
Apologies, I am not sure how to include an image of what I expect and what I am getting.
What gets us into trouble is not what we don’t know, its what we know for sure that just ain’t so.