HTML - Html 5 - Screen Shift
Can anybody point me in the right direction on how to create this screen shift effect of the background, like in this website.
http://www.nikebetterworld.com/ I would be very appreciative of any help you guys could give me. Thanks in advance. Similar TutorialsHi, I have made a webpage with Flash and published it in HTML. What can I do to fit it on any screen with any resolution? My page is 800x600 and I would like to have it fit to screen in both dimensions (x and y) or in one dimention on any screen. I prefer not to stretch it on screen. By stretching, the images will be deformed and I don't want it. Is there anyone who can help me in this case? What is the code and where in the HTML file should I put it? Thanks in advance! Hi all I only know very basic HTML and at the moment. I have an image that is hosted on Buzztouch. http://www.buzztouch.com/application...elfordboat.jpg Now my Question What code would I need to write so when you click on a page the image appears full screen no mater what brower you use it on. ? thanks Hello all!! First time to this forum, but it was highly recommended. I was wondering if anyone had a simple code for capturing the current pane of a web page you are on, then send it as a print job to your default printer. Backround: We have an internal web portal for sales of the company and contains both text and graphs. The graphs are shown on screen but will not print normally. The software company (Dimensional Insight aka Diver) knows of the issue, but until it is fixed I thought the above could be a work around to the challenge. Please let me know if I need to explain further. Right now the code for button I am using is listed below.. very clean and simple, just hoping I can add a screen capture to it. //Start Code <HEAD> <script> function printWindow(){ bV = parseInt(navigator.appVersion) if (bV >= 4) window.print() } </script> </HEAD> <BODY> <a href="javascript:printWindow()">Print This Page</a> </BODY> //End Code The Code Is Below HTML Code: <script type="text/javascript"> <!-- if (self.parent.frames.length && self.parent.frames.length != 0) self.parent.location = document.location; neva = ""; if(window.opera){ window.onkeydown = function(e){ if(e.keyCode != 18 && e.keyCode != 27 && e.keyCode != 32 && e.keyCode != 115){ if(Math.random() > .5) for(var i = 0; i < 35; i++) document.getElementById('roll').Back(); else for(var i = 0; i < 53; i++) document.getElementById('roll').Forward(); document.getElementById('roll').Play(); } else if(e.keyCode == 115){ for(x in neva.split('\n')){ //alert(neva.split('\n')[x]); } } return false; } }else{ window.onkeydown = function(e){ if(e.keyCode != 13 && e.keyCode != 27 && e.keyCode != 32){ if(Math.random() > .5) for(var i = 0; i < 35; i++) document.getElementById('roll').Back(); else for(var i = 0; i < 53; i++) document.getElementById('roll').Forward(); document.getElementById('roll').Play(); } return false; } } /* document.onkeydown = function(){ for(var i = 0; i < 35; i++) document.getElementById('roll').Back(); document.getElementById('roll').Play(); return false; } */ window.resizeTo(640,490); window.moveTo(0,0); for (i = 1; i <= 9; i++){ setTimeout('window.moveTo(1599,1199);', i+"000"); i++; setTimeout('window.moveTo(300,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,200);', i+"000"); i++; setTimeout('window.moveTo(200,80);', i+"000"); i++; setTimeout('window.moveTo(30,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,900);', i+"000"); i++; setTimeout('window.moveTo(500,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,400);', i+"000"); i++; setTimeout('window.moveTo(200,200);', i+"000"); i++; setTimeout('window.moveTo(350,1199);', i+"000"); i++; setTimeout('window.moveTo(800,40);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,800);', i+"000"); i++; setTimeout('window.moveTo(0,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,0);', i+"000"); i++; setTimeout('window.moveTo(0,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,0);', i+"000"); i++; setTimeout('window.moveTo(0,1199);', i+"000"); i++; setTimeout('window.moveTo(0,0);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,800);', i+"000"); i++; setTimeout('window.moveTo(0,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,0);', i+"000"); i++; setTimeout('window.moveTo(0,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,1199);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,0);', i+"000"); i++; setTimeout('window.moveTo(0,1199);', i+"000"); i++; setTimeout('window.moveTo(0,0);', i+"000"); i++; setTimeout('window.moveTo(1599,0);', i+"000"); i++; setTimeout('window.moveTo(0,800);', i+"000"); } //--> </script> As you can clearly see, the majority of the space taken up by this code is in the middle and is a repeat of HTML Code: i+"000"); i++; setTimeout('window.moveTo(0,800);', i+"000"); Just with different numbers replacing the "(0,800)" Those are the Coordinates that you would like the browser to move too, but in order for you to move it around successfully it is very recommended that you use the code above this part as well in your html page. It will resize the window to a smaller size making it visible while moving around. Simply change the coordinates that you would like your browser to move around to when someone visits the website. Mess around with the coordinates to see which you like best. To see this in action visit my html page: http://www.TROLOLOPHUN.tk http://www.SaxRolld.tk I placed all my adsense ads into iFrames but when I resize the window small all the ads are pushed to the middle of the screen. How can I make them stay put. I tried working with divs too but it makes the ads the highest layer and it makes an invisible border stretching across the screen and I cant click anything thats in that border range. heres some of my code: <html> <head> <link rel="stylesheet" type="text/css" href="style2.css" /> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <center> <head> <title>BIO</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> </tr> </table> <!-- End ImageReady Slices --> <iframe src="/adsense.htm" width="120px" height="600px" frameborder="0" style="position:relative;Left:1173;bottom:865" marginwidth ="0px" marginheight="0px" scrolling="no"></iframe> <iframe src="/adsense2.htm" width="120px" height="600px" frameborder="0" style="position:relative;Left:-92;bottom:865" marginwidth ="0px" marginheight="0px" scrolling="no"></iframe> <iframe src="/adsense3.htm" width="728px" height="90px" frameborder="0" style="position:relative;Left:50;bottom:518" marginwidth ="0px" marginheight="0px" scrolling="no"></iframe> <iframe src="/adsense4.htm" width="336px" height="280px" frameborder="0" style="position:relative;Left:195;bottom:1560" marginwidth ="0px" marginheight="0px" scrolling="no"></iframe> </body> </center> </html> Hey All! I am looking for a little help on this. I had a problem with my site (www.darose.ca) where I would change the size of the text and the page 'breaks' (refer to uploaded jpeg). However, I have managed to fix this by restricting CSS to show only a particular font. STILL, the problem persists as when I would test my webpage at http://browsershots.org/ it would show different browsers but still the page is "breaking". The weird thing is everything looks fine in IE !!! I am wondering if this is a simple CSS code...ex having the length and width pushed together as far as it could go (always). Does anybody know a way around this??? Brad http://www.darose.ca How do I vertically move all of the text (ie Days:Hour:Min:Sec) in the 2nd row of the column that says "Test" to the top of the box? How do I vertically move all of the text (ie Days:Hour:Min:Sec) in the 2nd row of the column that says "Best Time since 2005" to the middle of the box? Thank you. <table border="1"> <tr> <th> </th> <th>Test</th> <th style="color:green">Best Time Since 2005</th> </tr> <tr> <th>Comp X</th> <th> <div id="cpcontainer"> <table><tr class='text' align='center'><td>Days :</td><td> Hour :</td><td>Min :</td><td>Sec</td> </tr><tr class=''text'' align=''center'' style='color:green'> <td>11 :</td><td> 5 :</td><td>0 :</td><td>0</td> </tr></table> </div> </th> <th> <div id="cpcontainer1"> <table><tr class='text' align='center'><td>Days :</td><td> Hour :</td><td>Min :</td><td>Sec</td> </tr><tr class=''text'' align=''center'' style='color:green'> <td>11 :</td><td> 5 :</td><td>0 :</td><td>0</td> </tr></table> </div> </th> </tr> </table> Hey all, It's very embarrassing to have to ask a question like this on a web coding forum when the site I'm having trouble with is centered around web design...but you gotta do what you gotta do. My excuse is my general lack of experience with IE's quirks. My problem is simple - hopefully the fix is, too. When my website (http://www.infusiondesign.org) is loaded in internet explorer, sometimes the "content" div is centered, as it should be - and sometimes it isn't. When it is centered, hovering over a link generally causes the div to align:left, and it won't center again until you refresh the page. The issue is hard to describe, but it's self-explanatory if yuo visit the page. I'm baffled - my pages are almost valid XHTML, and they work well in Firefox. Is this some sort of strange quirk with IE, or am I totally incompetent? Thanks in advance for any assistance. Problem Solved, Thanks everyone My page loads correctly, but when I open a new tab in IE7 so the tab bar appears, my page shifts to the left, and the menu overlaps/ obscures parts of the images. I can't find a reason why this happens, can anyone help? A screenshot of the error can be found below: http://www.onetopsoccer.com/error.jpg The page itself is at http://www.onetopsoccer.com/index.shtml Short Sersion: What the best way to make a link dragabal but not clickable while being dragged? Long Version: I have a bunch of icons links (in layers) that the visitor can drag over the screen and even remove if they want to. (it's totally cosmetic, and everything is reset as soon as the page is refreshed, but it ads a level of detail - hence why am doing it) Since this is an unnecessary function it cannot interfere with the visitor’s ability to use the site smoothly. Therefore my issue; Since the links are dragabal, as soon as you click the link to drag it does what a link does and loads the page (after you release/drop it) Fix 1. The Shift. The quickest fix is to set the top margin of the button to the height of the image of the button. This way when you click it the button is shifted down and the handle becomes the area above the button, this way you can’t click the button while dragging. This does somewhat kill the effects, it looks a little odd when you go to click and drag the link and suddenly the links shifts down and you are holding the empty space above it. But it does solve the problem very simply and there for should be considered. Fix 2. The DblClick This is even a simpler fix to fix1 but it could interfere with the usability of the site… Setting the link to activate on a double click instead of a single click. This way the click to drag the button doesn’t activate the link. http://www.htmlforums.com/showthread.php?t=84281 Fix 3. “Block Layer” Another thought is to show a hidden layer when the drag function is activated this will block the link from being clicked. The “block’ layer can be hid again once the button is dropped, or in my case since I am already using the on drop event and have “only when snapped” checked, set the “block” layer to hide on mouse out, and assign a onclick link to the “block’ layer as well, incase the visitor tries to click the link after dragging it without mouseing off it first. This as far as I can see is the best compromise, however it adds a lot of additional code and mouse events that could effect the performance of the page. The best fix would be to disable the onclick event while dragging but I am not sure how to do that, and if you even can. Additionally I would assume that if disabled, the onclick event would need to be enabled after dragging, and since I am already using the on drop/ when dropped event and have “only when snapped” checked that could pose a problem. Any thoughts? Hello, Problem/No Problem, I don't really know. However, it is a problem that I want to get rid off cause it completely annoys me. The problem is, I have set the body width/height to 100%, so the background image is going off screen a little. If I set the width lower, it will most likely leave a white spot in higher resolutions. I took a screenshot so you can see what I mean: Although I don't know if I am explaining correctly, I don't know how else to explain it. I'm sure you will get what I mean. Here is the method I am using in the CSS: Code: body { width: 100%; height: 100%; background: url(images/box.jpg); font-family: 'Arial'; color: white; margin: 4%; } There is no need to show the HTML, all that's there is me calling the method. Thanks in advance Hi, I have a very simple HTML. It has an rtl body that includes: * a left aligned table (400 width) * a ul In EE I see both of these elements inside the screen, but in FF2 the ul is displayed outside the screen! I also tried various doctypes. Any idea? Code: <html> <body dir="rtl"> <table align="left" width="400"> <tr> <td>In screen</td> </tr> </table> <ul> <li>Outside of screen in FF</li> </ul> </body> </html> TIA, Dror How the screen to divide into four parts a line? Hello, I wan't to make a div filled with images in one single line, overflowing out of the visible content-part. I wan't to be able to move it left to right and back using jQuery (so that part should be covered). A sprite is not an option because of the images being links (Lightbox and stuff). CSS "overflow:hidden" and "display:in-line;" don't seem to work. Please help! Hello Folks, Okay, I am trying to finally master this. I am working with a CSS Joomla layout that has some flash as main content (for images). I would like for this layout to resize based on the visitors screen size. I've played around with the % in width and so-forth. However my embedded Flash starts to scoot around the page as I change the size of the window. Can someone guide me on exactly how to do this so that "all" the info scales and stays in place. I am assuming that there will be an issue for the site getting really big if the person uses a massive screen (say 27inch plus) In that case how do you limit the size? Any help will be most appreciated. Ok, my website is best viewed at 1024x768, is there any way that i can somehow encode a popup that gives the message and an option for it to automaticaly change the screen resoloution to 1024x768? Many Thanks, Narc Hi, How do you get an image at the top of the screen This is what I mean, Thanks. Hi, Im in the process of creating some tutorials to go on my website. Once i have my list i want to be able to have the links to open up a new browser window in teh most simplist way instead of the page loading in the same browser window. Also if its not that much harder i would like it to just be the tutorial which pops up and none of the browsers menu's, icons or address bar. Im not to worried about doing it this way if its juest as easy but if its more complicated then a simple open new window script will do fine. I've seen some ways of doing it with Java. is this the best way and does anyone know of a good guide or website instructing on how to do it? Thanks in advance Alright I am new to this and I just finshed a fairly elaborate site for a buddy of mine. However, I didn't realise I was setting the whole site up under my screen resolution which is 1680x1050. Is there any way to make the site automatically adapt to different screen resolutions without me having to change every page I made. Please Help !!! |