Jump to content

Ingolme

Moderator
  • Content count

    13,129
  • Joined

  • Last visited

  • Days Won

    334

Everything posted by Ingolme

  1. I'm going to need to know what a "sparkline" even is and how to make it appear. There's a lot of stuff on that page.
  2. You need to add units to your CSS properties or else they'll be ignored. document.getElementById(slID).style.top = Yx + "px"; document.getElementById(slID).style.left = Xx + "px"; The reason that elements may stack vertically is that there isn't enough horizontal space for them, use your DOM inspector to see the size of the element that is containing these elements. Perhaps we could diagnose the problem easier if we have a live example of the code.
  3. HTTP and HTTPS Compatibility

    In your HTTPS page all the Javascript files should also be loaded with the HTTPS protocol because the browser does not allow loading unencrypted content on an encrypted page. This file on your page is still using unencrypted HTTP: http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  4. Embedding a YouTube video with a backup image

    From my observations, nobody ever embeds videos in e-mail, what they do is put an image that looks like a video and that image is a link to the video on youtube.
  5. Need help with a loop in SQL

    This does not look like code from any database library I'm familiar with. You're at high risk of hacking through SQL injection because you're putting user input straight into the query. Wherever in your code the database object's fetch() method is, you would put the loop there.
  6. A image set on a image with php , html and css

    You're going to have to build this using either Javascript's Canvas API or PHP's GD library or ImageMagick library. Both Javascript and PHP solutions will require a considerable amount of work and advanced programming knowledge.
  7. PHP mail

    The only problem I see is that you're sending the mail twice. What happens when you run the code?
  8. Displaying header data on google

    If Google thinks that your site description is too short it just makes up one that it likes better. Make your page descriptions long and descriptive.
  9. Menubar and links that don't work in FF and IE

    Don't use a button element, instead give the btnMenu class to the link itself.
  10. Displaying header data on google

    Make sure that any PHP errorson your site are fixed and the only thing you can do is to wait for Google to crawl it again and hopefully your site will not be broken when that happens. Google webmaster tools may have something to speed up the process.
  11. How to align words to center of navigation bar?

    Since they use the float property text align has no effect. To center the menu you will have to remove the float property and set the display of the menu items to inline-block. Then you can use text-align on the container.
  12. Break statement code

    The problem is likely that you're mixing tabs and spaces. Use either one or the other. Not all editors have the same size tabs which is why your indentation goes wrong when pasting it on the forum.
  13. Script definition in header

    The style element only changes the appearance of the page, not the data or content. You will need to write Javascript code to check the innerWidth property of the window when the page is loaded or resized.
  14. Rule being ignored

    It would be a good idea to explain the solution you proposed, otherwise nothing will be learned. If I'm remembering correctly, the NC flag makes the rule case-insensitive.
  15. Problems with Tooltips

    Use inline elements inside the paragraph, like <span> instead of <div>.
  16. On the Nature of the CSS display Property

    Elements hidden by CSS are still in the DOM and can still be accessed by Javascript. If there are values in the AJAX response that shouldn't be on the page, then don't put it on the page. You can store the result of an AJAX request in a variable instead of printing it.
  17. If you decide to go with that approach, it is. The server would return a JSON structure a bit like this: { "html" : "<div class=\"something\">Some content</div>", "stylesheet" : "/css/style.css" } There are hundreds of potential solutions, that's just one of them. Programming is about identifying and solving problems. I'm not saying this is the best solution for your project, it is just one of them.
  18. I'm don't know how your entire website is structured. Are you using a content management system? Whichever system you're using, it should provide a way to modify content in the head of the page. The browser should only see one <head> element per document, otherwise your HTML is invalid. If you want to add a stylesheet after an AJAX call, you can generate it using Javascript. Have the server return the URL of the stylesheet and have Javascript use the URL to generate a <link> tag. // Assuming AJAX returned a JSON object in the data variable if(data.stylesheet) { var link = document.createElement("link"); link.rel = "stylesheet"; link.href = data.stylesheet; document.getElementsByTagName("head")[0].appendChild(link); }
  19. I would recommend against it. Since not all browsers support the scoped attribute you'll find that in some browsers your CSS is applying to elements outside of your scoped area. Aside from that, doing it this way means your CSS is scattered all over the place which is harder to maintain. If you don't have a <head> section then where is all the metadata for your page?
  20. The only advice I'd give is to not generate the stylesheet with PHP since you want the stylesheet to be cached by the user's browser. Outside of that, it really doesn't matter. It's common to have PHP compile a list of necessary stylesheet URLs and then have the template create <link> tags for them in the <head> section. With this approach, different sections of your program can append stylesheets to the list if they need one of their own.
  21. Template examples / h3 classes not centered on iPad

    I suspect that your iPad's browser is very out of date. From your screenshot I would guess that it does not support the CSS transform property.
  22. How to make this?

    I disagree. From my experience, general-purpose content management systems often fail to meet requirements and often get in the way when trying to code a solution. Their main purpose is to provide a way to make website to those without coding skills.
  23. Date time not working...

    You're trying to compare objects again. These objects cannot be compared using < or >. Get the timestamp from them using ->getTimestamp() and compare those. I still suspect that the dates you're getting are Monday today and Sunday next week, but you can find that out very easily by printing their values: echo 'Start: ' . $start->format('M d') . "\n<br>"; echo 'End: ' . $end->format('M d') . "\n<br>";
  24. Date time not working...

    I would guess that Sunday is six days after Monday. According to the manual: http://php.net/manual/en/datetime.formats.relative.php Weeks always start on Monday. A weekday name moves to the next day of the given name.
  25. Date time not working...

    The DateTime objects can't be compared with the usual comparison operators because they're not primitive data types. Compare their timestamps instead: $dtA->getTimestamp() > $dtB->getTimestamp()
×