浏览代码

Make sure large images fit in viewable space

pdontthink 4 年之前
父节点
当前提交
d834041532
共有 2 个文件被更改,包括 18 次插入4 次删除
  1. 10 1
      templates/default/css/default.css
  2. 8 3
      templates/default/read_display_images_inline.tpl

+ 10 - 1
templates/default/css/default.css

@@ -1018,7 +1018,7 @@ div.readInlineImages {
 }
 }
 
 
 div.readInlineImages table {
 div.readInlineImages table {
-    width: 50%;
+    /* width: 50%; */
     margin-top:8px;
     margin-top:8px;
     margin-bottom:8px;
     margin-bottom:8px;
     margin-left: auto;
     margin-left: auto;
@@ -1042,6 +1042,15 @@ div.readInlineImages td.image {
     padding:10px;
     padding:10px;
 }
 }
 
 
+div.readInlineImages td img {
+    width:100%;
+}
+
+table.imageWrapper {
+    margin-top:0 !important;
+    margin-bottom:0 !important;
+}
+
 div.viewHeader table.table1 {
 div.viewHeader table.table1 {
     width: 100%;
     width: 100%;
 }
 }

+ 8 - 3
templates/default/read_display_images_inline.tpl

@@ -50,11 +50,16 @@ if (count($images) == 0) {
         }
         }
       ?>
       ?>
      </td>
      </td>
-     <td>&nbsp;</td>
     </tr>
     </tr>
     <tr>
     <tr>
-     <td colspan="2" class="image">
-      <img src="<?php echo $img['DisplayURL']; ?>" />
+     <td class="image">
+      <table cellpadding="0" cellspacing="0" class="imageWrapper">
+       <tr>
+        <td>
+         <img src="<?php echo $img['DisplayURL']; ?>" />
+        </td>
+       </tr>
+      </table>
      </td>
      </td>
     </tr>
     </tr>
    </table>
    </table>