Jump to content

Ingolme

Moderator
  • Posts

    14,895
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. But you can see the same text in the Wikipedia article for "HTML Element"
  2. Just CSS: td { white-space: nowrap} This makes the table be exactly as wide as the content in it, without any line breaks.
  3. Try setting the white-space property to "nowrap" in all the table cells.
  4. If you have a function that keeps checking the image's src attribute every few milliseconds you can execute a function if a change is found.
  5. You'll need a server-side language for that. The server can keep track of the time between one submission and the next.
  6. You're overwriting the variable with a function. By the way, you need to declare variables with "var" To make a function execute after the page has loaded, use the onload event. window.onload = otoload;function otoload() { // Do something}
  7. I don't think all browsers support the third parameter od the setTimeout function.This should fix it (I think): setTimeout( function() { openWindow(i); }, 1000 + (i*100) ); If not, you'll need to attach the value of i to somewhere else.
  8. You need to add an "onsumbit" handler to the <form> element in which you return false in order to prevent the form from being submitted. The most basic (and pretty useless) example of disabling form submission: <form onsubmit="return false;" ... >
  9. It is pretty much "against the rules" to disable browser functions from a user. There probably is a better solution, but in order to find it we need to know why you want to disable refreshing.
  10. You can use HTML entities: value="<p>My first paragraph.</p>" Here's a list of the main entities you'll need to escape:< = <> = >" = "' = '& = &
  11. Yes, it is important that we know what you have learnt. By "we" I mean the people who are making an effort to teach you. If you have not learnt the basics, you cannot go any further. The reason you keep on having problems is because you're missing fundamental knowledge.
  12. The setTimeout won't stop the loop, it will just run a function after a specified amount of time after the setTimeout was called.
  13. If you cannot prove to us that you know what we have taught you, we have no reason to try to teach you more.
  14. Since it's not working there must be an error somewhere. Have you looked at the error console?
  15. I'm talking about all this. You have the entire thing wrapped in a span tag. Also, "style3" is not a very descriptive class name. <span class="DropCap">W</span><span class="style3">3Schoolsis a website developer's portal, with tutorials and referencesrelating to web development subjects, including HTML, XML, CSS,JavaScript, PHP, ASP, ASP.NET, and SQL. W3Schools is free ofcharge, and is funded through text and display advertising.[1]The tutorials and references on the website and the related codeare proprietary.[2]<br /><br />The site derives its name from the abbreviation for the WorldWide Web; W3 is a numeronym of WWW. W3Schools is not affiliatedwith the W3C.[3] Members of the W3C have asked W3Schools toexplicitly disavow any connection, but they have refused to doso.[4][better source needed]<br /><br />It is created and owned by Refsnes Data, a Norwegianfamily-owned software development and consulting company.[5]<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></span> Remove all the <br> elements and wrap each paragraph in a <p>aragraph tag. There's a selector for the first letter of a paragraph, so use that instead of a <span> <p class="first-paragraph">W3Schools is a website developer's portal, with tutorials and referencesrelating to web development subjects, including HTML, XML, CSS,JavaScript, PHP, ASP, ASP.NET, and SQL. W3Schools is free ofcharge, and is funded through text and display advertising.[1]The tutorials and references on the website and the related codeare proprietary.[2]</p><p>The site derives its name from the abbreviation for the WorldWide Web; W3 is a numeronym of WWW. W3Schools is not affiliatedwith the W3C.[3] Members of the W3C have asked W3Schools toexplicitly disavow any connection, but they have refused to doso.[4][better source needed]</p><p>It is created and owned by Refsnes Data, a Norwegianfamily-owned software development and consulting company.[5]</p> In your CSS stylesheet change .DropCap for .first-paragraph:first-letter
  16. Putting "this" matters. If you do not put it, the program will look for a global variable called "style" and won't find it. Try this again and show the exact code you're using in the event handler. I can't see how it could fail unless it was implemented wrong.
  17. By the way, you should change that <span> and all those <br> elements for a set of <p> elements: one around each paragraph.
  18. I don't know why you have an empty <div> element. Everything works fine for me. Just change this code: <div id="MenuContainer"><ul><li class="Home"><a href="index.html" class="Home-a">Home</a></li><li class="AboutUs"><a href="about-us.html" class="AboutUs-a">About Us</a></li><li class="Services"><a href="services.html" class="Services-a">Services</a></li><li class="Testimony"><a href="testimony.html" class="Testimony-a">Testimony</a></li><li class="ContactUs"><a href="contact-us.html" class="ContactUs-a">Contact Us</a></li></ul><div> </div><div><img alt="MemberShip Seal" src="#" width="139px" height="211px" /></div></div> For this: <ul id="MenuContainer"><li class="Home"><a href="index.html" class="Home-a">Home</a></li><li class="AboutUs"><a href="about-us.html" class="AboutUs-a">About Us</a></li><li class="Services"><a href="services.html" class="Services-a">Services</a></li><li class="Testimony"><a href="testimony.html" class="Testimony-a">Testimony</a></li><li class="ContactUs"><a href="contact-us.html" class="ContactUs-a">Contact Us</a></li><li><img alt="MemberShip Seal" src="#" width="139px" height="211px" /></li></ul> The CSS you have currently works fine and doesn't need to be changed.
  19. There should be no frameset in your document. Just an <iframe>.The CSS that you set in your CSS stylesheet is applied to your HTML document. CSS and HTML are not exclusive to eachother.
  20. You forgot to copy the CSS you had applied to the <div> and add it to the <ul> element. float: left;width: 168px;text-indent: 15px; You also forgot to keep the class names "Home", "AboutUs", "Services" and their CSS definitions.
  21. The <div> element there is superfluous. Just give the menuContainer ID to the <ul> element instead.
  22. Just remove all the margin and padding and bullets from these <ul> and <li> elements and they'll behave exactly the same as the <div> does <ul id="MenuContainer"> <li class="Home"><a href="index.html" class="Home-a">Home</a></li> <li class="AboutUs">About Us</li> <li class="Services">Services</li> <li class="Testimony">Testimony</li> <li class="ContactUs">Contact Us</li></ul> #menuContainer { margin: 0; padding: 0; list-style-type: none;}#menuContainer li { margin: 0; padding: 0;}
  23. As long as you can ensure that "this" is refering to the element you want. I'm always wary of using "this" in any context.Normally in an event, you'll pass the event object as a function parameter and access the current element as [eventobject].target or [eventobject].srcElement for Internet Explorer. Internet Explorer has a global window.event object rather than a function parameter.
  24. If you have access to the current node, just move up two parent nodes: element.parentNode.parentNode.style.backgroundColor = "#ccc"
  25. Declare them all as global and then set their values inside the function. var userBday;var bDaySplit;var birthDay;var birthMonth;var birthYear;$("#submit").click(function() { userBday = $("#bDay").val(); bdaySplit = userBday.split("-"); birthDay = bDaySplit[2]; birthMonth = bDaySplit[1]; birthYear = bDaySplit[0];}); The reason your code is failing is because all the code outside of the function is executed first. All of it, as soon as the page has loaded, and then it does not run anymore.
×
×
  • Create New...