Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. Are you specifically setting the width to exactly "40%"? If you're not, then I need to see exactly the line of code you are using.
  2. What code are you using to change the width? I suspect you may be missing units.
  3. No, it's literally looking for a "?" or "#" in the string. I haven't read the full source code, but I assume it's looking for the query string and hash in the URL. These are the parts of a URL:http://www.example.com/path/file.html?a=1#extra-dataProtocol Host name URI query string hash The query string always starts with a "?" and the hash always starts with "#"
  4. The image file itself is still the same size. It is just resized to fit within the screen. As a developer, it's usually your responsibility to resize the images that your clients provide to you before putting them on the website. I can understand your English.
  5. You must not set the width or height if you're using the img-responsive class. It will automatically adapt to fit within the available width. If you specify a width you will override the responsive part of the code.
  6. When you set max-width to 100% you are telling the image that it is not allowed to be any wider than the width of the box that contains it. You have to put that style right on the <img> element itself, not on its container or something else. If you're using Bootstrap, the img-responsive class already does that for you.
  7. Set the max-width, rather than the width, then set the height to auto. This should work: .img-header { max-width: 100%; height: auto;} I would not recommend having an image as large as 2024x2559 on a website simply because it will take forever to download and most people won't look at it in its native resolution. You should resize it to something smaller for the page and, if you really need to show people the full image, have a direct link to it from the web page.
  8. Distribution of W3Schools content without explicit permission from the owners is copyright violation http://www.w3schools.com/about/about_copyright.asp
  9. Ingolme

    End Of PhP 5.4

    well, by "support" they mean that they will no longer be fixing bugs. However, I think many people will continue to host their websites on servers with older versions of PHP.
  10. The PHP file and the HTML page that is calling it should both share the same encoding, preferably UTF-8. The files need to be saved as UTF-8 in your text editor and then need to be served to the browser as UTF-8 using meta tags or HTTP headers.
  11. Ingolme

    AppML

    The tutorial has been back up for a few months, I think. They reopened the project.
  12. There are things called CSS precompilers which let you do that. You should search for LESS or SASS.
  13. XML is normally used to transfer data between web applications. It has been replaced by JSON in many instances, but it is still used a lot.
  14. It appears selection styles aren't inherited. The solution would be to apply the selection style to the span elements as well.
  15. You need more more than CSS to make that. CSS can be used to give the page its appearance, but the functionality needs to come from a server-side language and optionally Javascript.
  16. That's just a matter of looping through the database results and printing <option> tags for them. Are you really having trouble with that?
  17. Yes, the result of SHOW TABLES can be fetched with the fetch_assoc(). Most likely the table name is in the array with index 0, but just to be sure, use print_r() to see what is actually returned.
  18. You can use the SQL query SHOW TABLES to return a list of tables.
  19. I figured the val() method only was for elements whose value can change. I don't know what jQuery does internally, so I use a method that I can be guaranteed will work. If val() works than go ahead and use it.
  20. It depends on what your function is doing. When I have time-critical Javascript I usually put it right inside or below the element that it's referencing.
  21. Now that you're passing the ID to the function, inside the function you need to get the element: function setWhite(id) { var element = document.getElementById(id);
  22. The closing </p> tag is not actually a requirement in HTML, but it's a good idea to put it anyway. As for the Javascript parameter, the problem is that you forgot to quote the string you're passing as an argument to the function. It should be like this: setWhite('company') rather than like this: setWhite(company)
  23. The thing with radio buttons is that, in Javascript, each radio button is completely independent from every other. You need to go through all the radio buttons looking at their "checked" property to see which one is selected. jQuery has a :checked selector, so you could do it this way: if ($('input[name=by]:checked').attr("value") == 'CHQ')
  24. I avoid the excessive use of CSS transforms in order to support older versions of Internet Explorer. However, I wouldn't suggest having text as part of the image for a button, I would make a background image for the button and put real text inside the element instead. It is better for screen readers and search engines.
×
×
  • Create New...