New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
img inside float does not respect width #10464
Comments
I trace this case a few hours, and found this lines of code may cause this problem.
can solve this issue. I think the real cause is that image inside float didn't get the width constraint. cc @pcwalton |
This still happens. |
Closing this as a likely duplicate of #3923. |
This seems different, the outer block is sized correctly, the problem is with the float itself, which in fact doesn't need to be a float: <!DOCTYPE html>
<style>
.reduced-width {
width: 100px;
border: solid;
}
.float-left {
display: inline-block;
border: solid cyan;
}
img {
width: 100%;
}
</style>
<div class="reduced-width">
<div class="float-left">
<img src="https://raw.githubusercontent.com/servo/servo/master/tests/html/doge-servo.jpg" />
</div>
</div> Should be: |
Affects: dn.se (swedish news site)
Test case:
Firefox:
Servo:
The text was updated successfully, but these errors were encountered: