HTML - Replacing Text With A Fade Effect
Hello,
I am trying to achieve something in html that im not sure is possible, but i have been told it is. If I have a line of text with a link, is it possible when someone clicks the link, the line of text changes out and a new line of text pops up? for example. if i have this: <p>hello, please click <a href="#">here</a> to change this text</p> when the user clicks the link, the line pops out and the following line pops in in its place: <p>hello, this is the new text, please click <a href="#">here</a> to change back to the old text</p> Is this possible to do with just html (html5?) and css/javascript? if so, how would i go about doing it? I appreciate any help. thank you. Ben. edit: i no longer need the text to fade, it just has to swap the lines of code on click. Similar TutorialsHello, I am using some Jquery code + CSS to display fade in and out text above each image. However, i can't figure out what I am doing wrong and the text is not being displayed when the user hovers the mouse over each image.. http://www.greekconcierge.com/group.php Any ideas? best regards, Andy I need a bit of help working out the best way to replace the frames on my website. It's been fine with frames until now, but I'm plannning to add a WordPress blog page to it and want it to show proper URLs at the top if someone links to the blog from another site. I have the blog working in the right frame offline, but I don't quite know how to solve the link problem. The menu on the left (in the left frame) needs to be there all the time for navigation around the rest of the site. At the moment it targets links into the right frame. It also needs to retain it's CSS/javascript functionality so I'm thinking refreshing the whole page each time with a new index.html won't allow the submenus to stay open. I don't think I can use CSS to have a linked page opening up on the right side as it would mean embedding the WordPress php in a CSS box somehow... I thought about iframes which might be the best idea, but am getting muddled wondering how to incorporate everything. I hope this makes sense and someone can help. The webiste is http://phybron.com Thanks. Hi, I have a website where i am reselling. They use fixed templates so its easy to use but they include header and footer html boxes so that you can put in your own code. I have used these boxes to change my background and font colour however there are a couple of images on there that are now the wrong colour and i cant seem to figure out code to change these images, just add to them. Does anyone know of any code that replaces one image with another? thanks! Chris I have this problem - I want to use this tree http://www.destroydrop.com/javascripts/tree/ on my page. On the left part of the page there would be the tree menu, on the right part there would be some data (tables, navigation etc.). First I had table with 2 cells, one with tree, one with data. Unfortunatelly the tree behaved badly (was cut when unwrapped). Then i replaced the table with <div tags>. This was ok at frst Code: <div style="float:left">Tree part</div><div style="float:left">Data part</div> Problem was, that when data was too wide, they were placed below the tree and not next to the tree This is better (wrapping wide data is ok): Code: <div style="white-space : nowrap ;"> <div style="display : inline ;">Tree part</div><div style="display : inline ;">Data part</div> </div> , but there's problem too - every other choice than display:block makes the tree again behave wrongly. I don't want to relinquish that tree - it's simple to construct, has many configuration choices, remembers state by cookies etc... Does exist another choice how to replace 2 cells (side-by-side) with <div> tags ? Or do you know another good (and free) tree such as above? Thanks. I listened to the advice a member here gave me a day ago and I ditched tables and just went with CSS. It's been working great so far, the page made with CSS looks exactly like the one made with tables - except for one thing: the submenu. In this picture you can see the problem: I want the red and orange submenu on the left to extend all of the way down to the footer. Here's my CSS for the footer, header, and submenu: Code: .subnav {position: relative; text-align: center; width: 140px; height: 100%; padding: 0px; float: left; vertical-align: middle; background-color: #FF7F00; border: 1px solid #fdaf61; border-right: 8px solid #ff0000; } .content {margin-top: 10px; width: 560px; height: 100%; margin-left: 140px; padding: 0px; border: 0px;} .footer {font-family: arial; color: #000000; background-color: #ff0000; font-size: 10pt; width: 100%; height: 20px; position: relative; padding-top: 5px; float: left;} I don't want to make the .subnav (submenu)'s position to absolute because then the orange and red will extend all the way down to the page when I want it to end at the footer. Thanks in advance So the plan is to play this sound MP3 as soon as the site gets entered. I also need it to loop untill the person clicks on either Dutch or English.. and gets directed towards the destined homepage where the MP3 file fades out within about 10 seconds. My question.. can I do all the above with HTML? I thought about editing the last part of the mp3 file manually so ill make it fade and then just play that faded mp3 as soon as the destined homepage gets entered.. but that wont be possible, since i dont know at which point the user clicks on Enter site... I have a small image (icon) which when clicked will take you to one of x number of sites via a random link generator. Here is my html where randomlink refers to a javascript routine in the head. <form> <p><input type="button" name="B1" value="Random Link >>" onclick="randomlink()"></p> </form> This works fine in returning a random website (actually one from a list). But I would like to replace the button with an image. I tried this but no joy: <form> <input type="image" onclick="randomlink()" value="Random Link >>" src="../images/icon.jpg"> </form> What am I doing wrong? Hugh This thread; plain and simple.. I want the following tags: HTML Code: background-image:url(blokje.png); background-image:url(onderkant%20curve.png); Replaced with something like this: HTML Code: <img id="pic" src="top.png" alt=""> Why? Because the top.png image is the only image that loads correctly when mail template is sent to mail recipients. Please advice, thank you. Source: HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <base href="http://asitisinheavenagain.com/"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="language" content="english"> <meta http-equiv="Content-Style-Type" content="text/css"> <title></title> <style type="text/css"> #container{ width:711px; margin:auto; font-family:verdana,sans serif; font-size:16px; background-image:url(blokje.png); } #pic { display:block; } #content { padding:0 0 60px 50px; background-image:url(onderkant%20curve.png); background-repeat:no-repeat; background-position:0 bottom; } #p-one { font-weight:bold; color:#410d3e; } #pic-one { text-align:center; } #pic-one img { width:170px; height:190px; } #link { font-size:12px; } </style> </head> <body> <div id="container"> <img id="pic" src="top.png" alt=""> <div id="content"> <p id="p-one"> Nieuwsbrief Februari 2010 </p><p><br> Beste Lezer van mijn eerste nieuwsbrief, </p><p> Graag wil ik je opmerkzaam maken op de nieuwste activiteiten van <br> Sessio Communications. </p><br> <p id="pic-one"> <img src="koord.jpg" alt=""><br> <a href="http://www.asitisinheavenagain.com">www.asitisinheavenagain.com</a> </p><p> Ik nodig je van harte uit om <a href="http://www.asitisinheavenagain.com">mijn website</a> te bezoeken.<br> Reacties zijn welkom. Doorsturen naar andere belangstellenden mag. <br> <a href="[FORWARDTOFRIEND]">Stuur deze email door naar een vriend of vriendin.</a></p><br> </p><p> Mocht je geen belangstelling hebben om op de hoogte te blijven van<br> mijn verschillende workshops en trainingen dan kun je dat via de <br> link onderaan de pagina aangeven. Je e-mail adres wordt dan verwijderd. </p><p><br> </p> </p> </div> </div> </body> </html> i have a flv movie on my webpage. it plays when you click on it. prob is that its black when the page loads since the first frame of the movie is black. i wanted to counter this by creating a jpg of same size which displays instead of the movie. visitor's would have to click on the jpg to then see the movie. how can this be acheived??? css? Hi everyone, I'm building a webpage with the center portion as the content area. I have a background image for the entire page, then another background image for the content area, then more image links stacked on top of the content area. What I want to do is for the content area to fade in/out to different pages depending on which image link I click. What I did is have all the "pages" in one html file, separated by div containers. Clicking a link will navigate to that div container. Since each "page" is essentially just a background image with some content on it, I tried to stack all of them into the exact same spot, but I'm having trouble with this as all the pages currently are lined up vertically, going below my screen hidden from view. Here's an illustration of what it looks like: I got everything working now except for two annoying problems: - The fade out animation does not play when navigating to any page except the home page (navigating to home page the animation will play) - When I go to any page except home page, all the images will appear lined up vertically, causing the scroll bar at the side to appear briefly before disappearing, since having each page stacked and all visible will go beyond bottom of my screen, which is very unappealing Here is my code so far: I've simplified it to two content pages so it's easier to read. HTML: Code: <meta charset="utf-8"> <title>The Elements of Go</title> <!--jQuery library--> <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script> <!--CSS for html--> <link href="css/ElementsOfGo.css" rel="stylesheet" type="text/css"> <!--<link href="css/ElementsOfGoFonts.css" rel="stylesheet" type="text/css">--> <!--FADE--> <script type="text/javascript"> $(document).ready(function() { setTimeout(function() { showWindow("mainpage") }, 2000); $('.aboutbutton').click(function() { hideAllWindows(); setTimeout(showWindow("aboutpage"), 2000); } ); $('.mainbutton').click(function() { hideAllWindows(); setTimeout(showWindow("mainpage"), 2000); } ); function hideAllWindows() { $('#mainpage').fadeOut(); $('#aboutpage').fadeOut(); $('#historypage').fadeOut(); $('#referencespage').fadeOut(); $('#strategiespage').fadeOut(); } function showWindow(name) { $('#' + name).fadeIn(); } }); </script> </head> <body> <div id="backgroundcontainer"> <div id="mainpage"> CONTENT GOES HERE FOR THIS PAGE <!--image link to head to about page--> <a class="transition aboutbutton"><img src="some image"> </a> </div> <div id="aboutpage"> CONTENT GOES HERE FOR THIS PAGE <!--image link to head back to main page--> <a class="transition mainbutton"><img src="some image"> </a> </div> </div> </body> </html> CSS: Code: @charset "utf-8"; /* CSS Document */ /*The webpage background image*/ body { background-image:url(../pictures/menubackgroundbubbles.png); background-position:center; background-attachment:fixed; background-repeat:no-repeat; } #backgroundcontainer { display:block; margin-left:auto; margin-right:auto; } /*background image for the content pages*/ #mainpage,#aboutpage { background-image:url(../pictures/background.png); background-position:center; background-attachment:fixed; background-repeat:no-repeat; overflow:hidden; display: none; margin-left: auto; margin-right: auto; position: relative; width:800px; height:570px; } #mainpage img,#aboutpage img { position: absolute; border:none; width: 119px; height: 119px; } Thanks for any help! Hi guys, we're using a WordPress theme for a clients site and we'd like to know how to make the hero banner on the home page automatically rotate? http://www.anchorhotelhaydonbridge.com/newsite/ Thanks in advance, Paul If you view my site: www.vivalefrench.com you can see that I have a few dead image links. And there are a few here and there and it would take a long time to adjust...is there an easy way to add a short piece of code at the top of my index page to detect 404 images and replace them with a standard (noimage.png) file.? I have seen somthing that you can do for each individual image but I'd like to put the code at the top to save time Hi anyone who could help ! In the following code by clicking on the right bottom corner of the image, a link to the destination site occurs. <img src="images/4ticket.jpg" border="0" usemap="#Map" width="203" height="90"> <map name="Map"> <area href="www.destination/play.php" shape="rect" coords="72, 56, 185, 77"> </map Now I would like to replace the link with a form submit button, as I need the value of the submit button (Play FREE!) to be posted to the destination site. Thanks for any help or hint I recently transferred my blog from 1and1 to hostgator, and all my apostrophes have been replaced with � How can this be fixed? So I need to make a background to a <div> with a color fade in it. Here's the catch: The application is a Joomla template, so the <div> height will be very variable, and will always be getting longer as additional content is added, so the standard trick of just making a gradient image and setting repeat x won't work. So what I need is a way to basically have two different colors (the starting and ending colors for the gradient) and have the browser always render that gradient regardless of the element height, 1000 px, or 10000 px. Is this possible? At the moment I have a color fade on the left side of our website behind the links. I am using the onmouseover and onmouseout commands to change the color when someone puts their cursor over the link. I have no problem changing the background color when the mouse is over the link, but I can't find a way to return it to the color fade background after someone removes their mouse. Any ideas as to what I should put in the onmouseout spot to get it to return to the original fading background? <tr> <td width="200" valign="top" style="filter:progidXImageTransform.Microsoft.Gradient(endColorstr='#F5F5F5', startColorstr='#CAF0F7', gradientType='1'" ><table width="87" height="155" border="0"> <tr> <td><table width="200" height="229" border="0" cellpadding="0" cellspacing="0" bordercolor="#F5F5F5" id="navigation"> <tr> <td width="200"><div align="center"><a href="Homepage.html" class="navText style3" onmouseover="style.backgroundColor='#CAF0F7';" onmouseout="????????" ><font color="#5A434A"><span class="style5">Home</a></div></td> </tr> thanks ok so I found this code online: HTML Code: <div class="one"><a class=one-link href="http://benjaminpotter.org"><span class=one-span onmouseover="if (window.Station) { Station.run(this, 'opacity', {from:Station.read(this, 'opacity') || 0, to: 1, time: 300, f: Interpolators.sineCurve}); }" onmouseout="if (window.Station) Station.run(this, 'opacity', {from:Number(Station.read(this, 'opacity')) || 1, to: 0, time: 300, f: Station.f.inversion(Interpolators.sineCurve)})" ></span></a></div> </div> can someone help me understand it and potentially get it to work? Hey Guys, I am a graphic designer and don't know much about HTML (but am taking a class and about to start a few books). I am using tumblr right now and I am try to replace the automated header ("black atom studio") with a jpg banner. Anyone know where in the HTML I would do this and what code I would need to swap in? (the website I am working at is www.blackatomstudio.com ) (not a plug, just incase you guys need to see what I am talking about) Here is the code I need help on. http://snipplr.com/view/8582/blackatoms-tumblr/ Hi Learning HTML Stuff.... I have a text box on my webpage. In code it is textarea tag. I want to replace this textbox with a rich-text text box. I have complete code for rich-text textbox. How can go about replacing the existing textarea code with the rich-text textbox code? I mean after replacing, will my entire code still work or i will need to do something else also? When text is entered in the box, i click the OK button, the information goes to the database. so when i replace textbox with code of rich-text textbox code, the OK button will still work ok? I have a page with a black background, and a script so that when a link is clicked the page fades out and then redirects to the link location. Since the background is black, the page fades to black before redirecting. How can I have it fade to white and then redirect? |