开发者

HTML, CSS, floated image margins? [closed]

开发者 https://www.devze.com 2023-01-27 15:51 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

When I have code like this:

<p>
     Some long text
     <img src="src" style="float: right" />
     the rest of the text
</p>

I'm getting the strange red areas shown below. How to avoid that? Both p and img have no margins and paddings (in the picture above img has 5 px l开发者_如何学Pythoneft and bottom margin).

HTML, CSS, floated image margins? [closed]


For the first red area, I have no idea what's going on without seeing the full HTML and CSS. The second red area (underneath the image) can't be removed. Your browser can't position any text close enough to the image, so it leaves that gap instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号