Jump to content

Ingolme

Moderator
  • Posts

    14,901
  • Joined

  • Last visited

  • Days Won

    177

Everything posted by Ingolme

  1. If you ask the validator, closing an empty element in HTML with /> will give you a warning.
  2. There's HTML, which is more correct without the closing slash, and XHTML, which is invalid without the closing slash. XHTML was abandoned in favor of HTML 5, so I recommend not worrying about XHTML syntax.
  3. SVG and canvas are not compatible. One stores data about shapes, the other manipulates a matrix of pixels.
  4. A small analysis of your situation: HTML editor previews can't be trusted, you must always test your pages in real browsers. Be sure that all all your HTML documents have a <!DOCTYPE> tag that is among the list shown here: http://www.w3schools.com/tags/tag_doctype.asp. It's preferrable to use the HTML 5 one. Not using a DOCTYPE will make different browsers render the same things much more differently from each other. I spot a mistake in your CSS code: color:e1e1e1; The color code should always be preceded by a # in order to work. Perhaps some browsers running in the old rendering mode do work without the # but a majority of browsers will not. It might seem difficult at first, but it is important to move away from table layouts. If we just keep fixing up your table layout with CSS you'll never really be able to transition to more modern layout methods that work a lot better. I haven't checked it in depth but this website may help you begin with full CSS-based layouts: http://learnlayout.com/ To answer your questions: Shorthand CSS rules are completely supported by even the oldest browsers in use today. I'm not sure what you refer to as "editable". I guess you mean that the cursor shows a text selection symbol. If you want to avoid that you either have to put all the <a> elements in a row in your source code or turn them into block elements using the CSS display property. Once they're blocks, in order to make them stay next to each other you have to use the CSS float property. Width normally does only apply to block elements. Normally block elements stack vertically, but as I just mentioned, the float property is used to keep them next to each other. It's difficult to pinpoint the exact reason this is happening without being able to see your page. Vertical alignment can be a little tricky and how it's done depends on the situation. Normally, setting an element's line-height to be equal to its height will vertically align everything in it.
  5. In order for Javascript to remember anything you need to use either cookies (compatible with the widest range of browsers) or local storage.
  6. Ingolme

    auto adjusting web

    What do you mean "auto-adjusting"? There are a series of different behaviors that could be given that description. Block elements automatically take the full width of their container so width: 100% is rarely ever needed.
  7. There's the inline-block element. It will be able to have width, height, margins and padding but will behave inline. That also means that whitespace in the HTMl code will be represented as a space between the elements, so you have to watch out for that. You can also use the CSS float property on block elements.
  8. How is it not working? Browsers always render from top to bottom, left to right. Elements go to the left of other elements that follow them.
  9. I've been using shorthand CSS for eight years without trouble.
  10. There's been support for CSS for 15 years, no need to worry about that. Normally the <img> tag just has src and alt attributes. class and id can be used for CSS styling or Javascript manipulation.
  11. Presentational attributes are not required, and best if they're not used. Presentional attributes are those that determine what an element looks like and how it's formatted.
  12. You can't do that. You can't make a reference to element properties that way. A variable does not point to generic things, just to specific things.
  13. I think errors might not show up until you actually execute the query.
  14. The setTimeout() function executes a function after a certain amount of time. If that function contains the setTimeout call then it will continue calling itself.
  15. The term "node" refers to an element in a data structure that all programming languages can implement. It's called a tree, a node is any part of the tree that contains data. Here's the Wikipedia article about trees: http://en.wikipedia.org/wiki/Tree_%28data_structure%29
  16. Ingolme

    FileSize from DB

    Have you ever done conversions between units before? Knowing how many bytes you have you can convert it to kilobytes or megabytes or gigabytes with a simple mathematical operation.
  17. Ingolme

    FileSize from DB

    A kilobyte is 1024 bytes, a megabyte is 1024 kilobytes.
  18. From Nodejs.org: It's a scripting language that employs Javascript syntax to build networking applications.
  19. Modify the innerHTML of an element or create and append new DOM nodes to the document.
  20. You were already told how: You still don't understand how the for() loop works.
  21. Why do you have that redundant variable e?
  22. I already told you why it doesn't work. You have an if condition that is supposed to turn the box pink if the box's color is lightblue. The box's color is never lightblue so it never turns pink. If you uncomment the other code you have another problem: The style attribute never was given the value "coral" and even if it did, once it has been set to another value you are not setting it back to "coral" anymore so that condition won't evaluate to true anymore.
  23. The reason your code doesn't work is that the background color is never being set to "lightblue"
  24. It seems like there's absolutely no place that gives knowledge in the way you would like it. You're at a point where you should try to adapt yourself to the information available rather than expect the world to adapt itself to you.
×
×
  • Create New...