Browse Source

Make sure large images fit in viewable space

pdontthink 4 năm trước cách đây
mục cha
commit
d834041532

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

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

+ 8 - 3
templates/default/read_display_images_inline.tpl

@@ -50,11 +50,16 @@ if (count($images) == 0) {
         }
       ?>
      </td>
-     <td>&nbsp;</td>
     </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>
     </tr>
    </table>