Skip to content

.card-img-top overflows card #20849

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

Closed
ZebTheWizard opened this issue Oct 6, 2016 · 3 comments
Closed

.card-img-top overflows card #20849

ZebTheWizard opened this issue Oct 6, 2016 · 3 comments

Comments

@ZebTheWizard
Copy link

I believe this is in all browsers.

I'm using 4.0.0-alpha.4 via cdn

When I use an image with the class "card-img-top" the image does not stay within the card.
This is because it doesn't have a defined width.

The"card-img-top" class needs to have a width of 100%.

Example of buggy code: https://jsfiddle.net/1v3dLj05/5/
Example of fixed code: https://jsfiddle.net/1v3dLj05/4/

@twbs-lmvtfy
Copy link

Hi @SoaringRadio!

You appear to have posted a live example (https://fiddle.jshell.net/1v3dLj05/4/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

  • line 31, column 7 thru column 54: No space between attributes.
  • line 31, column 7 thru column 64: Quote " in attribute name. Probable cause: Matching quote missing somewhere earlier.
  • line 31, column 7 thru column 150: Bad value <link rel= for attribute src on element script: Illegal character in path segment: < is not allowed.
  • line 31, column 7 thru column 150: Attribute stylesheet" not allowed on element script at this point.
  • line 31, column 7 thru column 150: Attribute href not allowed on element script at this point.
  • line 31, column 153 thru column 161: The text content of element script was not in the required format: Expected space, tab, newline, or slash but found " instead.
  • line 64, column 3 thru column 17: Stray doctype.
  • line 65, column 1 thru column 7: Element title not allowed as child of element body in this context. (Suppressing further errors from this subtree.)

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(Please note that this is a fully automated comment.)

@twbs-lmvtfy
Copy link

Hi @SoaringRadio!

You appear to have posted a live example (https://fiddle.jshell.net/1v3dLj05/5/show/light/), which is always a good first step. However, according to the HTML5 validator, your example has some validation errors, which might potentially be causing your issue:

  • line 31, column 7 thru column 54: No space between attributes.
  • line 31, column 7 thru column 64: Quote " in attribute name. Probable cause: Matching quote missing somewhere earlier.
  • line 31, column 7 thru column 150: Bad value <link rel= for attribute src on element script: Illegal character in path segment: < is not allowed.
  • line 31, column 7 thru column 150: Attribute stylesheet" not allowed on element script at this point.
  • line 31, column 7 thru column 150: Attribute href not allowed on element script at this point.
  • line 31, column 153 thru column 161: The text content of element script was not in the required format: Expected space, tab, newline, or slash but found " instead.
  • line 62, column 3 thru column 17: Stray doctype.
  • line 63, column 1 thru column 7: Element title not allowed as child of element body in this context. (Suppressing further errors from this subtree.)

You'll need to fix these errors and post a revised example before we can proceed further.
Thanks!

(Please note that this is a fully automated comment.)

@cvrebert cvrebert changed the title [BUG] Card-img-top overflows card .card-img-top overflows card Oct 7, 2016
@mdo
Copy link
Member

mdo commented Oct 9, 2016

I believe this is a dupe of #20560. It's since been resolved and will ship with Alpha 5.

@mdo mdo closed this as completed Oct 9, 2016
@mdo mdo added this to the v4.0.0-alpha.5 milestone Oct 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants