HTML doc for scalable viewing and auto resizing -


i trying email invite out basic html5, no js , simple me.

i got following work degree. have 3 jpgs in top row , 2 in next text. resizes until gets small. ipad example puts last jpg in top row in next. etc.

i reduced percentages of width add less 100% total per row , helps point. when reduce maybe phone screen size overflow jump.

<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html>   <head>     <meta http-equiv="content-type" content="text/html; charset=utf-8"/>     <title></title>     <meta name="viewport" content="initial-scale=1">     <style type="text/css">       p { color: #000000 }     </style>   </head>   <body lang="en-us" text="#000000" dir="ltr" style="background: transparent">     <span class="sd-abs-pos" style="position: relative">       <img src="data:image/png;base64,data"            name="a1" width="16.66%" border="0">       <img src="data:image/png;base64,data"            name="a2" width="16.66%" border="0">       <img src="data:image/png;base64,data"            name="a3" width="33%" border="0">       <img src="data:image/png;base64,data"            name="a4" width="33%" border="0">       <img src="data:image/png;base64,data"            name="b1" width="33%" border="0" style="margin-left: 16.66%">       <img src="data:image/png;base64,data"            name="b2" width="33%" border="0">     </span>     <p align="center" style="margin-top: 3vw; margin-bottom: 5vw">       <font face="baoli sc"><font style="font-size: 5vw">         100 schools<br>         invites opening of it's<br>         50<sup>th</sup>         school in<br>         etc<br>         november 28, 2016          </font></font>     </p>   </body> </html> 

i can't sure without working example, 1 of common reasons white space between elements.

try either putting image elements in line no spaces

<img src="" width="33%" /><img src="" width="33%" /><img src="" width="33%" /> 

or using comments "hide" white space:

<img src="" width="33%" /><!-- --><img src="" width="33%" /><!-- --><img src="" width="33%" /> 

this occurs because although white space collapsed, leave single space. since elements leave 1% spare (33% * 3 = 99%), if spaces less 1% of width, display correctly. on small screens spaces take more 1% of width, push last element new line.

example:

.box{    display: inline-block;    width: 33%;    height: 20px;    background-color: #555;  }
with white-space  <div>    <div class="box"></div>    <div class="box"></div>    <div class="box"></div>  </div>  without white-space (inline)  <div>    <div class="box"></div><div class="box"></div><div class="box"></div>  </div>  without white-space (comments)  <div>    <div class="box"></div><!--    --><div class="box"></div><!--    --><div class="box"></div>  </div>


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -