Krygore
Bronze Coder
I am attempting to put an image in a div that includes multiple paragraphs, that being said, I have the div set to "p class='floatLeft'" and an id tag for the image with CSS properties that float right. How can I remove the paragraph background from behind the image and have it wrap the same as the text does?
Here's my current code:
[CODE lang="html" title="Float flaw"]<div p class="floatLeft">
<img id="ms210" src="images/ms210detail.jpg">
<p>Welcome to the Backwoods Carver webpage! Inspired by carvers all over the world!</p>
<p>Work ranges from custom carved bears, mushrooms, trees, spirits, sea creatures, and more!</p>
<p>Carver designed pieces as well as commissions and requested trial pieces.</p>
<p>Click a link above to contact me, check out the gallery, or learn more about my carving hobby and how it came to pass in the about and blog sections!</p>
</div>[/CODE]
And here is my current webpage output:
I have tried creating the image in a seperate div, which only dropped it or raised it from the paragraphs, and I have tried removing the float left attribute from the div to see if the background would follow the words. It didn't.
Any suggestions are appreciated!
Here's my current code:
[CODE lang="html" title="Float flaw"]<div p class="floatLeft">
<img id="ms210" src="images/ms210detail.jpg">
<p>Welcome to the Backwoods Carver webpage! Inspired by carvers all over the world!</p>
<p>Work ranges from custom carved bears, mushrooms, trees, spirits, sea creatures, and more!</p>
<p>Carver designed pieces as well as commissions and requested trial pieces.</p>
<p>Click a link above to contact me, check out the gallery, or learn more about my carving hobby and how it came to pass in the about and blog sections!</p>
</div>[/CODE]
CSS:
.floatLeft{
float:left;
}
p{
text-indent:30px;
background:darkslategray;
color:white;
border-style: groove;
border-radius:15px;
border-color:orangered;
padding:5px;
margin:10px;
}
img{
border-style:groove;
border-width:5px;
border-radius:10px;
border-color:orangered;
}
#ms210{
width:30%;
float:right;
}
And here is my current webpage output:
I have tried creating the image in a seperate div, which only dropped it or raised it from the paragraphs, and I have tried removing the float left attribute from the div to see if the background would follow the words. It didn't.
Any suggestions are appreciated!