Defect #3163
closed
Large inline images overflow
Added by Justin Grevich over 15 years ago.
Updated over 10 years ago.
Description
attached images that are larger than the current page size are allowed to overflow past the container. Shouldn't we at least use a css rule to stop the overflow?
Is there a simple way around this?
Files
- Assignee set to Eric Davis
- % Done changed from 0 to 10
You can set a max-width to all images in #content:
svn diff
Index: public/stylesheets/application.css
===================================================================
--- public/stylesheets/application.css (revision 4358)
+++ public/stylesheets/application.css (working copy)
@@ -79,6 +79,7 @@
* html #content{ width: 75%; padding-left: 0; margin-top: 0px; padding: 6px 10px 10px 10px;}
html>body #content { min-height: 600px; }
* html body #content { height: 600px; } /* IE */
+#content img { max-width: 100%; }
#main.nosidebar #sidebar{ display: none; }
#main.nosidebar #content{ width: auto; border-right: 0; }
Are there other elements than images that may cause overflow?
Apparently IE8 does not implement max-width correctly in some cases: http://reference.sitepoint.com/css/max-width#compatibilitysection
- Assignee deleted (
Eric Davis)
I am stepping down from working on Redmine. If someone else is interesting in working on this issue, feel free to reassign it to them.
Eric Davis
Attached is a patch for what I've been using. Let me know how it works.
- % Done changed from 10 to 20
- Subject changed from attached images are allowed to overflow containers to Large inline images overflow
- Status changed from New to Closed
- Assignee changed from Justin Grevich to Jean-Philippe Lang
- Target version set to 2.5.0
- Resolution set to Fixed
- Has duplicate Defect #12244: Preview Layout breaks on large images added
Jean-Philippe Lang wrote:
Fixed in r12864.
I'm afraid this fix works only for the wiki and not the issue tracker, see #14021.
div.wiki img {vertical-align:middle; max-width:100%;}
Stefan Tatschner wrote:
I'm afraid this fix works only for the wiki and not the issue tracker, see #14021.
No, this fix is not only for the wiki. The patch is not yet applied here.
Also available in: Atom
PDF