I have a page that displays a pdf report in a RadWindow via javascript, but for some reason it has two sets of vertical scrollbars: one created by Internet Explorer and one in the PDF itself.
I am displaying other PDF reports in the exact same fashion, the only difference between this one that I can see is that the report is loaded from a different domain(just different port in the development environment, still the same physical server either way).
This does not happen on Chrome, only on IE. And I can't even seem to get either of the scrollbars removed even using the DOM editor in IE's development tools.
I've tried giving the radwindow a CSS class which set overflow to hidden and display inline, the report page itself also has html and body with those settings.
Here is the javascript code I use to open the radwindow:
function showRadWindowSupply(url, title) {
var oWnd = $find("<%=_rwInvoice.ClientID%>");
oWnd.setUrl(url);
oWnd.set_title(title);
oWnd.show();
sizeRadWindowSupply(oWnd, 70, 80);
return false;
}
function sizeRadWindowSupply(oWnd, width, height) {
var browserWidth = $telerik.$(window).width();
var browserHeight = $telerik.$(window).height();
oWnd.setSize(Math.ceil(browserWidth * width / 100), Math.ceil(browserHeight * height / 100));
oWnd.center();
}
Here is the RadWindow markup used on the aspx page:
<telerik:RadWindowManager id="_rwm1" runat="server">
<Windows>
<telerik:RadWindow ID="_rwInvoice" runat="server" Behaviors="Close,Maximize" CssClass="holdsSplitter" AutoSize="false" VisibleStatusbar="false" Modal="true" ></telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
And here is the HTML that is generated for the RadWindow:
<div class="RadWindow RadWindow_Telerik rwNormalWindow rwTransparentWindow holdsSplitter" id="RadWindowWrapper_ctl00_ContentPlaceHolder1__rwInvoice" style="left: 204px; top: 58px; width: 957px; height: 472px; visibility: visible; position: absolute; z-index: 3001; -ms-touch-action: none; transform: none; backface-visibility: visible;" unselectable="on">
<table class="rwTable" style="height: 433px;" cellspacing="0" cellpadding="0">
<tbody>
<tr class="rwTitleRow">
<td class="rwCorner rwTopLeft"> </td>
<td class="rwTitlebar">
<div class="rwTopResize">
<!-- / -->
</div>
<table align="left" class="rwTitlebarControls" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width: 16px;"><a class="rwIcon"></a></td>
<td><em style="width: 847px;" unselectable="on">Supply Orders Invoice</em></td>
<td nowrap="" style="white-space: nowrap;">
<ul class="rwControlButtons" style="width: 62px;">
<li><a title="Maximize" class="rwMaximizeButton" href="javascript:void(0);"><span>Maximize</span></a></li>
<li><a title="Close" class="rwCloseButton" href="javascript:void(0);"><span>Close</span></a></li>
</ul>
</td>
</tr>
</tbody>
</table>
</td>
<td class="rwCorner rwTopRight"> </td>
</tr>
<tr class="rwContentRow">
<td class="rwCorner rwBodyLeft"> </td>
<td class="rwWindowContent rwExternalContent" valign="top">
<iframe name="_rwInvoice" src="http://devsvr:87/Reports/StaticReports/OrderHistoryDetail.aspx?ID=1748" frameborder="0" style="border: 0px currentColor; width: 100%; height: 100%;"></iframe>
</td>
<td class="rwCorner rwBodyRight"> </td>
</tr>
<tr class="rwStatusbarRow" style="display: none;">
<td class="rwCorner rwBodyLeft"> </td>
<td class="rwStatusbar">
<table align="left" style="width: 100%;" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="width: 100%;">
<input tabindex="-1" class="rwLoading" id="ctl00_ContentPlaceHolder1__rwInvoice_status" readonly="" unselectable="on"><label style="display: none;" for="ctl00_ContentPlaceHolder1__rwInvoice_status">status label</label></td>
</tr>
</tbody>
</table>
</td>
<td class="rwCorner rwBodyRight"> </td>
</tr>
<tr class="rwFooterRow">
<td class="rwCorner rwFooterLeft"> </td>
<td class="rwFooterCenter"> </td>
<td class="rwCorner rwFooterRight"> </td>
</tr>
</tbody>
</table>
</div>
Any suggestions are greatly appreciated.
Related
I tried to align the html video tag and image in html table. But did not succeeded. Seems like video tag align more bottom instead of top.
Picture is attached how its look.
Css
.newsImage {
width: 354px;
height: 204px;
vertical-align: top;
text-align: left;
}
HTML:
<table cellpadding="0" cellspacing="0" class="auto-style1" align="center">
<tr>
<td colspan="5" style="height: 80px; margin-bottom: 20px;">
<h2>NYHETER</h2>
</td>
</tr>
<tr>
<td class="newsImage">
<span id="Content_lbImageNews1"><video width="354" height="240" controls="controls" preload="metadata"><source src="https://bokning.7a.se/Media/newsImages/11332241297A-v5.mp4#t=0.5" type="video/mp4">Your browser does not support the video tag.</video></span>
</td>
<td> </td>
<td class="newsImage">
<span id="Content_lbImageNews2"><img src="https://bokning.7a.se/Media/newsImages/1142145490news3.png" Height="204" Width="354"></span>
</td>
<td> </td>
<td class="newsImage">
<span id="Content_lbImageNews3"><img src="https://bokning.7a.se/Media/newsImages/279096911logga.jpg" Height="204" Width="354"></span>
</tr>
</table>
In your inline height value you set it to be 240 instead of 204 which matches your other elements:
<video width="354" height="240" controls="controls" preload="metadata">
Change that back and you should have to mess with any other code.
.newsImage {
min-width: 354px;
min-height: 204px;
vertical-align: top;
text-align: left;
}
<table cellpadding="0" cellspacing="0" class="auto-style1" align="center">
<tr>
<td colspan="5" style="height: 80px; margin-bottom: 20px;">
<h2>NYHETER</h2>
</td>
</tr>
<tr>
<td class="newsImage">
<span id="Content_lbImageNews1"><video width="354" height="204" controls="controls" preload="metadata"><source src="https://bokning.7a.se/Media/newsImages/11332241297A-v5.mp4#t=0.5" type="video/mp4">Your browser does not support the video tag.</video></span>
</td>
<td> </td>
<td class="newsImage">
<span id="Content_lbImageNews2"><img src="https://bokning.7a.se/Media/newsImages/1142145490news3.png" Height="204" Width="354"></span>
</td>
<td> </td>
<td class="newsImage">
<span id="Content_lbImageNews3"><img src="https://bokning.7a.se/Media/newsImages/279096911logga.jpg" Height="204" Width="354"></span>
</tr>
</table>
Have you try this to the css file
.newsImage {
vertical-align:top;
}
.newsImage {
vertical-align:top;
}
<html>
</html>
<body>
<table cellpadding="0" cellspacing="0" class="auto-style1" align="center">
<tr>
<td colspan="5" style="height: 80px; margin-bottom: 20px;">
<h2>NYHETER</h2>
</td>
</tr>
<tr>
<td class="newsImage">
<span id="Content_lbImageNews1"><div class="videoWrapper"><video width="100%" height="100%" controls="controls" preload="metadata"><source src="https://bokning.7a.se/Media/newsImages/11332241297A-v5.mp4#t=0.5" type="video/mp4">Your browser does not support the video tag.</video></div></span>
</td>
<td> </td>
<td class="newsImage">
<span id="Content_lbImageNews2"><img src="https://bokning.7a.se/Media/newsImages/1142145490news3.png" Height="204" Width="354"></span>
</td>
<td> </td>
<td class="newsImage">
<span id="Content_lbImageNews3"><img src="https://bokning.7a.se/Media/newsImages/279096911logga.jpg" Height="204" Width="354"></span>
</tr>
</table>
</body
I have 3 tables, cascading one after the other. I have a div, that I want to place on right side of these tables. The height of div may vary according to text inside. Currently the div is displayed below tables, like the image below;
<table class="class1" cellpadding="0" cellspacing="0" style="margin-top: 0px;">
<tr>
<td class="cell1">Cell1</td>
<td class="cell2">Cell2</td>
</tr>
<tr>
<td class="cell1">Cell3</td>
<td class="cell2">Cell4</td>
</tr>
</table>
<table class="class2" cellpadding="0" cellspacing="0" style="margin-top: 0px;">
<tr>
<td class="cell1">Cell5</td>
<td class="cell2">Cell6</td>
</tr>
<tr>
<td class="cell1">Cell7</td>
<td class="cell2">Cell8</td>
</tr>
</table>
<table class="class3" cellpadding="0" cellspacing="0" style="margin-top: 0px;">
<tr>
<td class="cell1">Cell9</td>
<td class="cell2">Cell10</td>
</tr>
<tr>
<td class="cell1">Cell11</td>
<td class="cell2">Cell12</td>
</tr>
</table>
<div class="mydiv">mydiv</div>
But I want to place the div next to tables, so that it can extend downwards.
Here is the working fiddle http://jsfiddle.net/ZHVuf/1/
You should add a container around you table like this :
Html
<div id="container">
<!-- Your table -->
</div>
And make him float left, like your div #myDiv
Css
#container {
float:left;
}
see updated fiddle.
On this second updated fiddle, I added a wrapper with a clearfix !
insertusernamehere commented that you could use overflow:hidden instead of the clearfix, see here for a new working way to do this with less code.
Apply float:left; to all the table and add clear:both; to second and third table.
now you already has float:left; for div just add position:relative;top:0; and see.
OR
create two divs and add tables in one with left floating and you already have second div.
<div class="tableContainerDiv" style="float:left;">
<table><tr><td></td></tr></table>
<table><tr><td></td></tr></table>
<table><tr><td></td></tr></table>
</div>
<div class="yourDiv" style="float:left;"></div>
html
<div class="cl">
<div style="float: left">
your tables
</div>
<div class="mydiv" style="float: left">mydiv</div>
</div>
css
.cl:after{ content: " "; display: block; height: 0px; clear: both; visibility: hidden;}
.cl {display: inline-block;}
/* Hides from IE-mac \\*/
* html .cl {height: 1%;}
.cl {display: block;}
/* End hide from IE-mac */
move tables inside another div , float to left;
HTML
<div class="table-wrap">
<table class="class1" cellpadding="0" cellspacing="0" style="margin-top: 0px;">
<tr>
<td class="cell1">Cell1</td>
<td class="cell2">Cell2</td>
</tr>
<tr>
<td class="cell1">Cell3</td>
<td class="cell2">Cell4</td>
</tr>
</table>
<table class="class2" cellpadding="0" cellspacing="0" style="margin-top: 0px;">
<tr>
<td class="cell1">Cell5</td>
<td class="cell2">Cell6</td>
</tr>
<tr>
<td class="cell1">Cell7</td>
<td class="cell2">Cell8</td>
</tr>
</table>
<table class="class3" cellpadding="0" cellspacing="0" style="margin-top: 0px;">
<tr>
<td class="cell1">Cell9</td>
<td class="cell2">Cell10</td>
</tr>
<tr>
<td class="cell1">Cell11</td>
<td class="cell2">Cell12</td>
</tr>
</table>
</div>
<div class="mydiv">mydiv</div>
CSS
.class1{
width: 100px;
height: 100px;
background: orange;
}
.class2{
width: 100px;
height: 100px;
background: green;
}
.class3{
width: 100px;
height: 100px;
background: gray;
}
.mydiv{
width: 200px;
background: blue;
float: left
}
.table-wrap{float:left;}
<table>
<tr><td>
<table class="class1" cellpadding="0" cellspacing="0" style="margin-top: 0px;">
<tr>
<td class="cell1">Cell1</td>
<td class="cell2">Cell2</td>
</tr>
<tr>
<td class="cell1">Cell3</td>
<td class="cell2">Cell4</td>
</tr>
</table>enter code here
<table class="class2" cellpadding="0" cellspacing="0" style="margin-top: 0px;">
<tr>
<td class="cell1">Cell5</td>
<td class="cell2">Cell6</td>
</tr>
<tr>
<td class="cell1">Cell7</td>
<td class="cell2">Cell8</td>
</tr>
</table>
<table class="class3" cellpadding="0" cellspacing="0" style="margin-top: 0px;">
<tr>
<td class="cell1">Cell9</td>
<td class="cell2">Cell10</td>
</tr>
<tr>
<td class="cell1">Cell11</td>
<td class="cell2">Cell12</td>
</tr>
</table>
</td>
<td>
<div class="mydiv">mydiv</div>
</td>
</tr>
</table>
I have the following table structure in my aspx page. I need to place the image at bottom right corner of a table cell. The code below works fine for IE and Chrome. But in Firefox and Safari, the image is displayed at the bottom right corner of the row, and not the cell.
<table style="width:100%">
<tr>
<td valign="top" style="width:20%; position:relative">
<div>
//some controls here
</div>
<img src="~/images/Index.JPG" runat="server" style="position:absolute; right:0; bottom:0"/>
</td>
<td valign="top" style="width:80%">
<div>
//control here
</div>
</td>
</tr>
<tr>
<td align="center" colspan="1" style="width: 20%">
//control here
</td>
<td align="center" colspan="2" style="width: 80%">
</td>
</tr>
<tr>
<td align="center" style="width:100%" colspan="2">
//control here
</td>
</tr>
</table>
Please help with this!!
Thanks.
I solved this problem by adding another row for the image and setting its alignment.
<tr>
<td style="width: 20%;" align="right" valign="bottom">
<asp:Image ID="Img1" runat="server" />
</td>
</tr>
I think you need to remove the position:relative of the parent td for this image as the absolute of the images is done relative to the td that has the position:relative
<table style="width:100%">
<tr>
<td valign="top" style="width:20%;">
<div>
//some controls here
</div>
<img src="~/images/Index.JPG" runat="server" style="position:absolute; right:0; bottom:0"/>
</td>
<td valign="top" style="width:80%">
<div>
//control here
</div>
</td>
</tr>
<tr>
<td align="center" colspan="1" style="width: 20%">
//control here
</td>
<td align="center" colspan="2" style="width: 80%">
</td>
</tr>
<tr>
<td align="center" style="width:100%" colspan="2">
//control here
</td>
</tr>
</table>
I have this code on my print.css:
#header, #tae, #nav, .noprint {display: none;}
width: 100%; margin: 0; float: none;
In order not to display the elements within those div tags. But I don't know with the code below why it isn't cooperating. If I place the div tags on it. And then I hit the print button. I see no output.
Here it is:
<div id="tae">
<table border="0" align="center" cellpadding="0" cellspacing="0" class="bg1">
<tr>
<td class="text1" style="height: 50px;">xd627 information management system</td>
</tr>
<tr>
<td class="bg5"><table border="0" cellspacing="0" cellpadding="0" style="height: 62px; padding-top: 15px;">
<tr align="center">
<td>Homepage</td>
<td>Database</td>
<td>About</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" class="bg6"> </td>
</tr>
<tr>
<td><table width="780" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="20"> </td>
<td width="297"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/spacer.gif" alt="" width="30" height="30" /></td>
</tr>
</tr>
<tr>
<td class="text2">
</div>
<div id="max">
<?php
//some php code in here showing a mysql table.
?>
</div>
What's wrong with my code? Does the php script depend on the one where I put the div tag in?
What do I do? All I want to show up in my page when printed is the mysql table. I'm using
Universal Document Converter to simulate printing.
The HTML in that snippet is broken and the entire document is contained in #tae, thus nothing will print as everything is in a container that is display: none;
Here's a cleaned up version of that markup.
<div id="tae">
<table border="0" align="center" cellpadding="0" cellspacing="0" class="bg1">
<tr>
<td class="text1" style="height: 50px;">xd627 information management system</td>
</tr>
<tr>
<td class="bg5">
<table border="0" cellspacing="0" cellpadding="0" style="height: 62px; padding-top: 15px;">
<tr align="center">
<td>Homepage</td>
<td>Database</td>
<td>About</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" class="bg6"> </td>
</tr>
<tr>
<td>
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="20"> </td>
<td width="297">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<img src="images/spacer.gif" alt="" width="30" height="30" />
</td>
</tr>
<tr>
<td class="text2"></td>
</tr>
<!-- All this is missing, from here... -->
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- ...to here. -->
<div id="max">
<?php
//some php code in here showing a mysql table.
?>
</div>
I followed the How do you get the footer to stay at the bottom of a Web page? post on stackoverflow...
But i couldn't make it too work in an asp.net web application.... I am using a master page for all pages...
How can i make footer stick to the bottom of the page?
For ref:
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0" class="bgpatt">
<tr style="height:25px;">
<td style="width:40%">
</td>
<td style="width:30%">
</td>
<td style="width:30%;" valign="top">
<div id="headermenu" style="width:300px;"><ul style="width:300px;">
<li><a title="Home" href="#" class="headerhome">Home</a></li>
<li><a title="About Us" href="#" class="aboutus">About Us</a></li>
<li><a title="Contact Us" href="#" class="contactus">Contact Us</a></li>
<li><a title="Feedback" href="#" class="feedback">Feedback</a></li>
<li><a title="Logout" href="#" class="logout">Logout</a></li>
</ul></div>
</td>
</tr>
<tr style="height:25px;">
<td colspan="3">
</td>
</tr>
<tr style="height:25px;">
<td colspan="3">
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr style="height:5px; background-color:#404040;">
<td colspan="3" valign="top" style="width:100%">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="width:45%;">
</td>
<td style="width:45%;">
<div id="header" style="width:300px;"><ul id="mainMenu" runat="server">
<li id="mainHome" runat="server"><span></span>Home</li>
<li id="mainManage" runat="server"><span></span>Manage</li>
<li id="mainEnquiry" runat="server"><span></span>Enquiry</li>
<li id="mainReport" runat="server"><span></span>Report</li>
</ul>
</div>
</td>
<td style="width:10%;">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td style="width:1px;"><div style="width:1px; height:450px;"></div></td>
<td style="width:95%">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</td>
<td style="width:5%">
<asp:ContentPlaceHolder id="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div class="wrapper"></div>
</td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%" style="height:25px;">
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="height:35px; top:10px;" class="footer">
<tr>
<td style="width:100%;" align="center">
Home |
About us |
Contact us |
Feedback
</td>
</tr>
<tr>
<td style="width:100%;" align="center" class="footer_text">
Copy Rights Xavytechnologies
</td>
</tr>
</table>
</td>
</tr>
</table>
I suggest to use a div like
<div id="Footer"> content </div>
then in your css put this
#Footer
{
position: absolute;
bottom: 0px;
height: 3px;
background-color: #666;
color: #eee;
}
or you can use AjaxControlToolkit library
I Also strongly recommand you change your layout from Table to div
I'm would also recommend a div structure using floating.
Markup:
<div class="bodyWrap">
<div class="header">
<!-- Insert content here -->
</div>
<div class="content">
<!-- Insert content here -->
</div>
<div class="footer">
<!-- Insert content here -->
</div>
<div style="clear:both"></div>
</div>
Css:
.bodyWrap
{
width: 500px;
}
.header, .content, .footer
{
width: 100%;
float:left;
}
I liked below better. It only works with an id and not with a class.
<div id="Footer"> content </div>
#Footer {
position: fixed;
bottom: 0px;
}