Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. The idea behind CSS is that the more specific selector takes precedence. It's not a hack because that's exactly how CSS is meant to function. The more components there are in a selector, the more specific it is. A selector with an ID in it takes precedence over any selector without an ID. A selector "div.myClass" is more specific than ".myClass". The selector "element > .className" is more specific than "element .className" Anything is better and less hackish than using !important, since the !important modifier deliberately breaks the CSS rules.
  2. It says that "Only subscribed users may save the button." when you click "Generate" at the bottom of the page. They're creating the image for you, but you have to make the <img> tag yourself and you have to upload the image to your web host. Learn about HTML images here: http://www.w3schools.com/html/html_images.asp
  3. That's usually referred to as a dropdown menu. For the clicking part, they usually use Javascript. It can be done in CSS with just hovering. Just search for "css dropdown menu" or "javascript dropdown menu" and you'll find thousands of examples.
  4. That site generates an image file for you, which you can put on your page using the HTML <img> element. If you want a diamond-shaped button you need to create an image.
  5. The answer is right in the PHP manual: http://php.net/manual/en/faq.passwords.php#faq.passwords.fasthash
  6. MD5 is not a secure way to encrypt passwords. From the PHP manual itself: http://php.net/md5
  7. AJAX is supported by older browers. FileReader is more modern technology.
  8. It depends on where you're getting the numbers from, I wouldn't use W3Schools as a reliable source. They even have a disclaimer at the bottom of the page: There are still many people who use IE8. I wouldn't support IE7 or under, though.
  9. Ingolme

    Help on HTML

    CSS is a language. It has a grammatical structure (see formal grammar). It just is not a programming language, it's a language that describes the appearance of HTML elements.
  10. The elements you need to make this happen are all there in your first post. It won't work on the resize event, but if the screen starts off small, the function won't be used. This script should only be called once when the page loads. if ($(window).width() > 514) { $('.subMenu').smint({ 'scrollSpeed' : 1000 });}
  11. You would need to figure out what event handlers are being added to the element and removing them. Many jQuery libraries have a specific function to remove things, but it looks like the developer of this one didn't add that functionality, so you'll have to manually go through his source code and find where the event handlers are being bound. Alternatively, you can use Javascript to detect the width of the page first and then only call the smint() method if the screen is wide enough.
  12. I would recommend having all the CSS in one file. Having so many files really slows down the page loading. Media queries in CSS re done with the @media rule, you can see more in the W3Schools.com CSS reference.
  13. jQuery or not, AJAX isn't really designed to load files locally from the computer because it's HTTP based. Web development tutorials assume that your page is being accessed through HTTP. Being able to open local files in Firefox is more of a bonus, rather than the lack of the feature being an incompatibility of Chrome. If you use AJAX on the local computer in a compatible browser, you'll find that the request status returns 0 instead of 200,
  14. You could set the display of the <ul> to block instead. There are 40px of padding on the #header. You'll need to reduce the bottom padding of that, and then add some space above the <ul> using top margin or padding on it.
  15. In order to make your pages responsive, you need to get rid of all width declarations that specify a width in pixels, ems or other fixed units. Setting the width in percentages helps make it responsive. I didn't see any <table> elements in the code you showed, but tables are rigid and not able to be responsive. If it's important for your page to be responsive you need to use other elements that are not tables and that do not use "display: table". img-responsive will make an image responsive (assuming you have bootstrap CSS included), but only if it's contained by an element that is also responsive. Most importantly, you must make sure your HTML is valid. Here are the validation results of your website: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.mrbanner.com%2FDefault.asp
  16. You can buy it right here: http://www.adobe.com/products/dreamweaver.html Personally, I think there are better HTML editors that are free. I use notepad++: http://notepadplusplus.org
  17. There is context missing. If that was all of your code then there wouldn't be a problem. Most likely your code is wrapped in something like $(function() {}); or $(document).ready(function() {}); That means that it is inside a function and not accessible from the console.
  18. If the code you're showing is inside a function, then the console will not have access to the speakers variable. If total_width was a variable instead of a property then it would only be accessible from inside the function. The console runs in the global scope.
  19. The variable $stmt was created on this line: $stmt = $conn->prepare("INSERT INTO MyGuests (firstname, lastname, email) VALUES (?, ?, ?)" );
  20. Yes, Google offers an API for that: https://cloud.google.com/translate/
  21. Please don't make multiple thread for the same question. You can continue discussion in the other thread: http://w3schools.invisionzone.com/index.php?showtopic=53440
  22. Literal is a value that's written right in the code. There are literal values being assigned to variables: var a = "Literal string";var b = 5; // Literal numbervar c = false; // Literal booleanvar d = ["a", "b", "c"]; // Literal array with literal strings in itvar e = { "a" : 1 }; // Literal object with a property called "a" with value 1 Here are examples of non-literal values being assigned to variables var a = giveMeAString(); // The value is returned by the function and it not explicitly written in the codevar b = a; // "a" is a variable, it's not a literal valuevar c = Math.PI; // The value of PI is stored in the Math.PI property.
  23. Linking to localhost will only work if the link is clicked on from your own computer. Other people can't see what is on your computer. Javascript doesn't have anything to do with this.
  24. If you want people to be able to see your website you need to buy web hosting. https://www.google.com/search?q=web+hosting&ie=utf-8&oe=utf-8 A web host will host your website and usually include a domain name with the package.
  25. You can set the vertical-align CSS property of the image to "middle"
×
×
  • Create New...