I'm trying to position an image inside the iframe, I researched but couldn't find what i needed.
Here's what I did,
The html
<div class="modal-body description">
<div class="modal-body description">
<table class="ui very basic celled table">
<tr>
<td>
<iframe frameborder="0" width="300" height="200" id="sigImage" onloadeddata="window.frames.scrollTo(300,500)" src="~/Content/images/signature.png" name="sigImage"></iframe>
</td>
</tr>
</table>
</div>
</div>
Here I tried to use the method (first I use onload) onloadeddata to position the image according to my need. Basically I have an image and i want to position a part of an image inside iframe on load.
The user can then scroll through the image to see other areas of the image.
How do I implement this?
Help would be appreciated.
I know a way but you have to use PHP, where you will store the path of your image file. This was discussed before.
Here is the link so that you can refer.
Related
I am setting up a school project its a gallery of pictures and I'm trying to get images to specifically align but I don't know how. Help.
I've tried basic align right, left and top but it doesn't work.
<img src="https://www.dike.lib.ia.us/images/sample-1.jpg/image" width="980" height="620">
<img src="https://imaging.nikon.com/lineup/lens/zoom/normalzoom/af-s_dx_18-140mmf_35-56g_ed_vr/img/sample/sample1_l.jpg" width="500" height="300" align="top">
<img src="https://northbridgecos.com/wp-content/uploads/2016/01/sample4_l.jpg" width="500" height="300" align="right">
<!-- Line trying to fix -->
I want the 3rd Image to go under the 2nd image and I want the 3rd image to be the same size as 2nd.
align is no longer supported in HTML5. In this specific case, the images should align correctly if you specify the units of width and height (e.g. px).
<img src="https://www.dike.lib.ia.us/images/sample-1.jpg/image" width="980px" height="620px">
<img src="https://imaging.nikon.com/lineup/lens/zoom/normalzoom/af-s_dx_18-140mmf_35-56g_ed_vr/img/sample/sample1_l.jpg" width="500px" height="300px">
<img src="https://northbridgecos.com/wp-content/uploads/2016/01/sample4_l.jpg" width="500px" height="300px"> <!-- Line trying to fix -->
Hi I have used display:flex to bring it on 1 line. below is the link.
https://jsfiddle.net/4rL7jnuc/1/888
if you need to check more about flex box then check below link. Thanks
https://www.w3schools.com/cssref/css3_pr_flex.asp
This is classic iframe code. All I want is to show different things when you click different links.
I want to display different galleries in wordpress on a page with different links. I don't wanna code different html's for each of them
<iframe id="myIframe" src="about:blank" height="200" width="500"></iframe>
<br />
Blogger<br />
CNN<br />
Google<br />
What you're trying to do is show and hide specific parts of the page when clicking on a link. You don't need to use iframes for that. I think you'd better use hidden div's for this, or maybe even an ajax call to load the different galleries. I'll show you the hidden divs approach :
<div id="gallery1" class="gallery">
A whole lot of html that makes up the 1st gallery
</div>
<div id="gallery2" class="gallery" style="display:none">
A whole lot of html that makes up the 2nd gallery
</div>
<div id="gallery3" class="gallery" style="display:none">
A whole lot of html that makes up the 3nd gallery
</div>
Show gallery 1
Show gallery 2
Show gallery 3
$('a').click(function() {
$('.gallery').hide();
$('#' + $(this).data('gallery')).show();
});
Here's a js fiddle: http://jsfiddle.net/nV5vy/
I have my image placed in a folder called images in the netbeans web pages folder and the link to it in my jsp is in a div as shown below:
<div id="image">
<p>
<img src="${pageContext.request.contextPath}/images/vote_image.GIF"
alt="banner"
width=600px
height=300px
/>
</p>
</div><!--end of image div-->
The problem is the image just doesn't load in the browser. What could be the problem? I used the same code in linux and it used to load the image. Could it be a browser problem, I'm using firefox 3.6 which I don't think should have a problem. Please let me know if any one has a clue as to why this is happening. If the problem is my code let me know how to adjust. Thank you
There are no units used in HTML width and height attributes.
<img src="${pageContext.request.contextPath}/images/vote_image.GIF"
alt="banner"
width="600"
height="300"
/>
Without seeing the rendered source of the page, I'd guess that's your problem. If not, try inspecting your image in Firebug and post what its rendered source looks like.
Also, make sure case sensitivity is not in play: gif vs. GIF.
i have a side by side banner code ,the work fine on Firefox.IE,opera,. but not work on google chrome how do i solved this problem ?
<table border="0" width="100%">
<tr>
<td>my Banner</td>
<td> </td>
</tr>
</table>
Take them out of the table, and use CSS to float:left;each banner, inside a container div. As long as their width allows it, they should line up side by side, in Chrome as well.
using your example:
<div id='container'>
<img src='banner1.png' style='float:left;' />
<img src='banner2.png' style='float:left;' /></div>
The best way would be to use a .css stylesheet and a banner class to separate your html from your css, but this is just an example to get you started :)
EDIT: I don't use inline javascript really, ever..so this is just a guess if you can do this or not, but it's worth a try.
<div id='container'><span style='float:left;'>
<script language='JavaScript' type='text/javascript'
src='zarclick.ir/banner.php? uname=pitgo&type=2&rows=1' >
</script></span><span style='float:left;'><script language='JavaScript'
type='text/javascript' src='zarclick.ir/banner.php? uname=pitgo&type=2&rows=1'
></script></span></div>
Might work, I'd try it if I needed to do it.
You should read this tutorial on how to create tableless layouts as this is the standard used for web 2.0 pages. You should always seperate the content from the layout in your web page, which means that your HTML file/s should only display the content, while the CSS file/s will contain the layout, and the JS file/s will contain the HTML manipulation scripts.
http://webdesign.about.com/od/css/a/aa102102a.htm
I've got the following control working called Uploadify. So I've placed the control inside a table. Here's a rough example:
<tr>
<td>
<div id="holdcontrol">
<input id="file_upload" name="file_upload" type="file" />
</div>
</td>
<td> OTHER STUFF </td>
</tr>
<tr>
The control is placed in a div called "holdcontrol". It is not possible to use hide or attr to disable the uploadify control because of its flash content. The simple solution is to simply set the height of the div to zero.
So I used $(#holdcontrol).css("height", 0); - so this "disables" the control which really 'hides' the button.
The problem is that it only partially closes down on the Uploadify control - Half of it - Which means that I can see "half of the control button". When I want to use the control again, I issue the command:
$(#holdcontrol).css("height", null); - that rebounds and it works fine. It's the setting of the div height inside the table cell to "hide" or to "disable" the Uploadify control that is bugging me.
Any thoughts or tips to truly setting that div height value to 0?
thanks and Happy Holidays!
After uploadify is loaded it changes your HTML code using JavaScript. In one of my Projects it adds an object outside of #holdcontrol so hiding #holdcontrol won't do anything.
<div id="holdcontrol">
<input id="file_upload" name="file_upload" type="file" />
</div>
<object
width="226" height="24" type="application/x-shockwave-flash"
data="http://www.example.com/ext/flash/uploadify.swf"
id="flashfileUploader"
>
<!-- even more code-->
</object>
As you can see the object gets the id #flashfileUploader - so if you just try to change #flashfileUploader instead of #holdcontrol you should be fine.
You can find this kind of undocumented stuff using FireBug (https://addons.mozilla.org/de/firefox/addon/1843/).
so long,
Tim