Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. That's an image file, CSS can't do that. You can use the browser's inspector to see what styles the element has.
  2. Put the margin on the image.
  3. You can add a margin to the element to separate it from the other content.
  4. In your function declaration you wrote J instead of I.
  5. The second parameter indicates the size of the subsets to search for, not the size of the initial set. The expected output is wrong. The people who provided the exercise mentioned it here: http://www.w3resource.com/javascript-exercises/javascript-function-exercise-21.php#comment-3039932910 The output should only have subsets with two elements.
  6. Adding the table display to the :before and :after pseudo-elements is a way to allow the container to wrap around floated elements and prevent vertical margins from collapsing.
  7. I'm not seeing the issue occur in Firefox or Chrome. Which browser and operating system are you using?
  8. How important are these files to you? The server clears them once the session ends, so you don't need to worry about disk space.
  9. Just for reference, this technique is considered a bad practice because it's not portable. I would recommend against using it. It also has the issue that it's missing the "<?php" part of the processing instruction to let parsers know which type of system is meant to use the instruction.
  10. HTML has no access to the PHP session data. Sessions are used to transfer data between PHP pages.
  11. It converts the string into a number so that math operations can be done with it. You should read about data types: https://www.w3schools.com/js/js_datatypes.asp
  12. You can write HTML and Javascript in any text editor.
  13. The RSS item has a <link> field specifically for the URL of the resource you're sharing. An RSS reader may not necessarily parse HTML, so you should make use of the proper RSS fields. You can't send POST variables from RSS, but a link can contain a query string from which PHP can create $_GET variables.
  14. I don't know where there's a list. Generally you should never develop for specific devices, you should just make your layout flexible enough (with help of media queries) to wotk on any screen regardless of size. This is usually achieved by testing your page in the responsive mode of your browser and resizing the viewport until it breaks, then you add a media query to correct the layout. But for reference, I start off with a design for the following devices, then make extra adjustments later: Small mobile (iPhone 4):Up to 374px (I usually use this just for specific elements that didn't fit) Mobile or small mobile in landscape): Up to 767px Tablet portrait: 768px Tablet landscape: 1024px (breakpoint usually between 800px and 900px) Desktop: 1025px and above Some people make designs for large desktop computers (1440px and above), but that's up to you. In general, there isn't one specific strategy for responsive design, this is just the approach from the companies I work with.
  15. The "pixels" used in CSS are not real pixels, they're called "device-independent pixels". A phone's native width may be 1080 pixels, but that usually translates to 375 device-independent pixels, small phones are usually 320 pixels, tablets are 768 pixels in portrait mode and 1024 pixels in landscape. Pixels are a more accurate way to measure devices because most of the time a device doesn't actually know its actual physical size and it just tries to make estimates.
  16. As far as the framework goes, W3.CSS just uses CSS. All the Javascript in the examples is added in separately from the library. I would assume people realize they're using Javascript when they start putting <script> tags on the page and copying Javascript code from the examples. I do think it's very important to teach new developers about accessibility and to provide a non-Javascript fallback when writing Javascript code, but I don't think it's necessary to put a warning about it in every single tutorial page that shows Javascript in it. Accessibility is not required by law except in government websites and banks or similar institutions.
  17. You already made a topic for this here:
  18. Please stop making duplicate threads. Your question was answered here:
  19. This is not a simple task, you would need to do a whole lot of programming to replicate this Flash application in HTML 5. Perhaps to start off you should learn a bit about HTML 5 canvas and then try to build upon your Flash source code.
  20. It appears to work in Firefox. Internet Explorer has issues with certain font files where they need some permissions to be set. It gives the following message " @font-face failed OpenType embedding permission check. Permission must be Installable." The font file has to be changed, you could also a WOFF file instead of OTF. If you're certain that you're using this font with the author's permission, you can use this tool to convert to font to be usable in Internet Explorer. https://www.andrebacklund.com/fontfixer.html
  21. So the W3Schools site does have a mistake. The staff of the website is almost never on the forums, so your best chance to provide feedback is to visit the page that has the problem and scroll down and click on the "Report Error" button at the bottom of the page.
  22. Both of those usages look valid to me. Is there any particular reason why the parentheses shouldn't be inside the ruby text?
  23. It only shows the source of files in the same local filesystem, regardless of domain name. If, for some reason, it did load a file from a URL it would only be able to show what was returned by that URL through HTTP.
  24. The issue seems to be this section of your CSS: @media only screen and ( min-width: 981px ) { .et_pb_button_4 { display: none !important; } .et_pb_text_21 { display: none !important; } .et_pb_text_23 { display: none !important; } .et_pb_text_16 { display: none !important; } .et_pb_text_9 { display: none !important; } .et_pb_text_3 { display: none !important; } .et_pb_text_5 { display: none !important; } .et_pb_text_7 { display: none !important; } .et_pb_text_1 { display: none !important; } }
  25. Ingolme

    help me

    This is the most primitive example using just Javascript: <textarea id="source"></textarea> <button id="action">Run</button> <iframe id="destination"></iframe> <script> var source = document.getElementById("source"); var destination = document.getElementById("destination"); var button = document.getElementById("action"); button.addEventListener("click", run, false); function run() { var d = destination.contentDocument; d.open(); d.write(source.value); d.close(); } </script> We have a textarea with the HTML code, an <iframe> where the HTML page is rendered and a button that copies the code from the textarea into the page. This will not look very pretty, so you should style it with CSS. There's also a server-side way to do it, but it is more complicated and you need to learn a server-side language. The advantage of the server-side version is that it will work even on browsers that have Javascript disabled. The concept is simple: You have a form that has an iframe as a target, when the form is submitted, the HTML code that was sent to the server is printed directly onto the page inside the iframe.
×
×
  • Create New...