HTML PDF dynamical height - html

I have an HTML, which is displaying a lot of PDF files. They are arranged in a table, and the table scales dynamically.
For a while this format was working:
.main .work {
display: table-row;
width: 100%;
height: 100%;
float: left;
position: relative;
overflow: hidden;
}
.main .work .media {
width: 100%;
}
.main .work .caption {
position: absolute;
display: block;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: #ffffff;
opacity: 0;
}
.main .work a:hover .caption {
opacity: 1;
}
<table width="100%" height="100%" border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="33%" height="100%">
<div class="work">
<a href="inner_004.html">
<embed src="https://www.oic.qld.gov.au/__data/assets/pdf_file/0006/7755/other-sample-googleanalytics-report.pdf#toolbar=0&navpanes=0&scrollbar=0" width="100%" height="100%" type="application/pdf" padding-bottom="1000pt">
<div class="caption">
<div class="work_title">
<h1>Report1</h1>
</div>
</div>
</a>
</div>
</td>
<td width="33%" height="100%">
<div class="work">
<a href="inner_005.html">
<embed src="http://www.googleguide.com/print/adv_op_ref.pdf#toolbar=0&navpanes=0&scrollbar=0" width="100%" height="100%" type="application/pdf" padding-bottom="1000pt">
<div class="caption">
<div class="work_title">
<h1>Report2</h1>
</div>
</div>
</a>
</div>
</td>
<td width="33%" height="100%">
<div class="work">
<a href="inner_006.html">
<embed src="https://www.oic.qld.gov.au/__data/assets/pdf_file/0006/7755/other-sample-googleanalytics-report.pdf#toolbar=0&navpanes=0&scrollbar=0" width="100%" height="100%" type="application/pdf" padding-bottom="1000pt">
<div class="caption">
<div class="work_title">
<h1>Report3</h1>
</div>
</div>
</a>
</div>
</td>
<td width="1%">
<div class="work">
<a href="MQBOVERALL.html">
<img src="https://assets.mspcdn.net/t_c-desktop-normal,f_auto,q_auto,d_c:noimage.jpg/c/12200-67-3.jpg" class="media" alt="">
</a>
</div>
</td>
</tr>
</tbody>
</table>
The HTML was working fine for a while, the PDFs were scaling with the table. I even have that Scaler image at the end of the table as a 4th cell, which makes sure that the cells should have a ration of 1:1.
I think in one of the recent updates in chrome made this happen.Now it's completely broken, and the PDFs have a fixed height. Is there any way to fix this?
Thank you in advance!
Edit: The same goes when I try to insert an HTML instead of the PDF:
<td width="33%" height="100%">
<div class="work">
<a href="inner_010.html">
<iframe src="https://www.google.com/" width="200%" height="190%" style="-webkit-transform:scale(0.5);-webkit-transform-origin: top left;-moz-transform: scale(0.5, 0.5); -moz-transform-origin: top left;">
<p>Your browser does not support iframes.</p>
</iframe>
<div class="caption">
<div class="work_title">
<h1>Measurement and Analysis<br>Overview</h1>
</div>
</div>
</a>
</div>
</td>
Edit2:
So basically a while ago this code resulted PDFs and HTML previews dinamically scaling with the other elements of the table. As you can seee there's that scaler image, which scales well if I change my window size in the live version. However the PDF and HTML previews' height remains a constant 150 for some reason. I want them to scale with the image, however only their with is scaling, not their height.

Related

Page Footer not following automatic spacing

I've been developing a website with a friend and I have a little problem.
We need to set our footer manually in the page with position:relative and margin-top to fix it because it isn't following the last <tr< end.
I've been trying to fix this problem around 3 weeks and I'm really frustrated with this...
The "footer" <tr> is following the "right-column" <tr>, but even I if I try to remove it, it tries to get aligned with a tr in the top of the page instead of the "container" <tr>
I'm posting the last lines of the code here, but since I have no idea of what is causing this, I'm sending below the website link itself.
My website is onlinewinxclub.com/centro-web/test.php
<tr id="container">
<td id="container_left_column">
<div style="position: relative; margin-top: 11px; margin-left: 15px;">
<iframe id="ranking_iframe" scrolling="no" frameborder="0" src="pages/Iframes/Access_guests.php"></iframe>
</div>
</td>
<td id="container_middle_column" style="vertical-align: top;">
<table id="content_videobox" cellspacing="1" cellpadding="1" border="0">
<tbody>
<tr style="">
<td id="content_videobox_firstcolumn" rowspan="3">
<div id="content_videobox_iframe" frameborder="0" allowfullscreen="" volume="0"><video
class="file" preload="metadata"
poster="././medias/images/Video_Thumbs/happy2021thumb.png"
src="././medias/videos/Happy_2021.mp4" data-overlay="1"></video></div>
</td>
<td id="content_videobox_secondcolumn">
<h2>
<span class="video-title" id="content_videobox_videotitle"
style="text-shadow: 1px 0px 0px #560027;">Happy New Year!</span>
</h2>
<p style="position:relative; top: 150px;">
<span class="video-description" id="content_videobox_videotext"
style="text-shadow: 1px 0px 0px #560027;">2021 arrived. Your favorite Winx fairies and
specialists are hoping it will be better than the last one. The witches? Not
sure.</span>
</p>
</td>
</tr>
<tr style="">
<td id="content_videobox_firstcolumn2">
</td>
</tr>
<tr style="">
<img onclick="javascript:Previous();" class="previous"
style="position: relative; top: 274px; left: 541px; cursor: pointer;"
src="././medias/images/arrow_left.png"
onmouseover="this.src='././medias/images/arrow_left_hover.png';"
onmouseout="this.src='././medias/images/arrow_left.png';">
<img onclick="javascript:Next();" class="next"
style="position: relative; top: 274px; left: 625px; cursor: pointer;"
src="././medias/images/arrow_right.png"
onmouseover="this.src='././medias/images/arrow_right_hover.png';"
onmouseout="this.src='././medias/images/arrow_right.png';">
<td id="content_videobox_secondcolumn2" style="text-align: center">
<span class="video-number"
style="color: white; font-family: Arial; font-size: 20px; height: bold; text-shadow: 1px 0px 0px #560027;">
1/4 </span>
</td>
</tr>
</tbody>
</table>
<div id="content_mininews_frame">
<iframe id="content_mininews_iframe" frameborder="0" src="pages/Mininews/NewsContentV2.php">Browser not
compatible.</iframe>
</div>
</td>
</tr>
<tr>
<td id="container_right_column" style="vertical-align: top;">
<div id="content_horoscope_iframe">
<iframe id="content_horoscope_iframe" frameborder="0" src="pages/Tips.php" data-ruffle-polyfilled="">Browser
not compatible.</iframe>
</div>
<iframe style="position: relative;width: 703px;height: 219px;margin-left: -467px;margin-top: -91px;"
frameborder="0" src="pages/Iframes/Download.php" data-ruffle-polyfilled="">Browser not compatible!</iframe>
</td>
</tr>
<tr id="footer">
<td id="footer_content" colspan="2">
<hr style="margin-top: auto; position: relative;">
<div style="margin-top: auto; position: relative;">
<img id="footer_rainbow_img" src="././medias/images/rainbow_logo_small.jpg">
<p id="footer_text">Winx Club™ a series created and produced by Iginio Straffi and Rainbow S.r.l<br>
© 2011-2021 Winx Club Online - Unofficial WinxClub.com inspirated by the old official website
</p>
</div>​
</td>
</tr>
first remove the
#container - position absolute
I think you are positioning it because of the iframe. why don't you add iframe with the .container_middle_column? you can add td and give a width or create new table inside the td, because you are using table. And make #footer - posision relative. If you use bootsrap it will be easy more than this.

Failing to use sticky to make left image stick and right image scrolable

I'm trying to create something similar to www.auratenewyork.com/ where the left image is fixed and the right part scrolls.What i got so far:
.sticky {
position: sticky;
top:0;
bottom:1000;
}
body{
margin:0;
background-image:"https://i.ibb.co/2yMYTJQ/Frame-3.jpg";
}
<img src="https://i.ibb.co/2yMYTJQ/Frame-3.jpg" alt="Frame-3" border="-30" padding="0" width="100%">
<div>
<div class="sticky">
<img src="https://i.ibb.co/Mk8rw9b/768width.png" alt="768width" border="0" style="width:40%; float:left">
</div>
<img src="https://i.ibb.co/C6Wjmnz/1152width.png" alt="1152width" border="0" width="60%" height="768px">
</div>
<div style="margin: 10% 0% 0% 0%;" >
<img src="https://i.ibb.co/2yMYTJQ/Frame-3.jpg" alt="Frame-3" border="0" width="100%" style="z-index:1">
</div>
<img src="https://i.ibb.co/2yMYTJQ/Frame-3.jpg" alt="Frame-3" border="0" width="100%">

How to place a clickable icon behind banner image?

I have this code:
<div align="center"><img src="http://via.placeholder.com/350x44" width="100%" height="44">
<div align="right">
<img src="http://via.placeholder.com/20x22" width="22" height="20">
<div align="right">
<img src="http://via.placeholder.com/20x22" width="22" height="20">
</div>
</div>
</div>
Which looks like:
But in my achievement I like it to look like this image:
Please can any one give me simple css code for this?
First of all The align attribute is not supported in HTML5. Use CSS instead.
You can use position:absolute to right align your images. Just remember to set position:relative to your parent element.
Stack Snippet
.main {
position: relative;
}
.right {
position: absolute;
right: 0;
top: 0;
}
.right img {
display: block;
border: 1px solid red;
}
<div class="main">
<img src="http://via.placeholder.com/350x44" width="100%" height="44">
<div class="right">
<img src="http://via.placeholder.com/20x22" width="22" height="20">
<img src="http://via.placeholder.com/20x22" width="22" height="20">
</div>
</div>

Image not scaling smaller as the resolution decreases

I am using bootstrap. This is my code.
HTML
<div class="choose1 hidden-xl hidden-lg hidden-md hidden-sm">
<div class="container">
<div class="row">
<div class="col-md-12 col-xs-12">
<table width="100%">
<tr>
<td align="center" style="padding:5px;"><img src="img/app_store.png" alt="" style="height:auto; width:220px;" /></td>
</tr>
<tr>
<td align="center" style="padding:5px;"><a href="#" ><img src="img/google_play.png" alt="" style="height:auto; width:220px;" /></a></td>
</tr>
<tr>
<td align="center" style="padding:5px;"><a href="#" ><img src="img/amazon.png" alt="" style="height:auto; width:220px;" /></a></td>
</tr>
</table>
</div>
</div>
</div>
</div>
And CSS:
.choose1 {
background: url('img/slides/1mobile.png') top center no-repeat;
height: 320px;
border: 1px solid red;
}
When I check the image on small screen, the banner does becomes small, instead it slips out of the div. Please check the live site here on small screen. WHat should I do so that the image transforms as much as the div is.
Try This:
.choose1 {
background: url('img/slides/1mobile.png') top center no-repeat;
border: 1px solid red;
background-size: 100% auto;
}

html css float:right with img is not working fine

HTML
<table class='titleStatus' id='title'>
<tr>
<td class='lefttop'></td>
<td class='bar'>Punch Data
<img class='minMaxClose' src='images/close.png'>
<img class='minMaxClose' src='images/max.png'>
<img class='minMaxClose' src='images/minimize.png'>
<img class='minMaxClose' src='images/setting.png'></td>
<td class='righttop'></td>
</tr>
</table>
CSS
.minMaxClose{float: right;}
OutPut at IE
Whereas i need output like on Firefox
apply float:left to all images first and then apply float:right to your container containing images
.bar img{
float:left;//for shifting alongside
}
.bar{
float:right;//for shifting entire division to right side
}
http://jsfiddle.net/Am34U/3/ give bar a width of 800px or something, and say you put punch inside a span and give it a span of 300px and float left, and give the span that contains the images a span of 500px and float left too.
HTML
<table class='titleStatus' id='title'>
<tr>
<td class='lefttop'></td>
<td class='bar'>
<span id="punch">Punch Data</span>
<span id="close">
<img class='minMaxClose' src='images/close.png'>
<img class='minMaxClose' src='images/max.png'>
<img class='minMaxClose' src='images/minimize.png'>
<img class='minMaxClose' src='images/setting.png'>
</span>
</td>
<td class='righttop'></td>
</tr>
</table>
CSS
.minMaxClose{
float: right;
}
#close{
background: purple;
width: 400px;
float: left;
}
#punch{
background: orange;
width: 300px;
float: left;
}
.bar{
width: 700px;
background: blue;
}
HTML
<table class='titleStatus' id='title'>
<tr>
<td class='lefttop'></td>
<td class='bar'>Punch Data
<!--[if IE]>
<div class='ico-wrapIE'>
<![endif]-->
<!--[if !IE]>
<div class='ico-wrap'>
<![endif]-->
<img class='minMaxClose' src='images/setting.png'>
<img class='minMaxClose' src='images/minimize.png'>
<img class='minMaxClose' src='images/max.png'>
<img class='minMaxClose' src='images/close.png'>
</div>
</td>
<td class='righttop'></td>
</tr>
</table>
CSS
.ico-wrap{float:right;}
.ico-wrapIE {
position: absolute;
right: 2px;
top: 2px;
}