Jump to content

Ingolme

Moderator
  • Posts

    14,897
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. I don't think i've heard any arguments about HTML indentation in all the years I've been developing. It's all a matter of preference.When working with inline or inline-block elements you sometimes have to avoid line breaks and spaces. If you have an unordered list and you set the <li> elements as inline-blocks you'll find that they're slightly spaced apart unless you put all the HTML code together. .inline li { display: inline-block; background-color: blue;} <!-- Rendered without spaces between the list items --><ul class="inline"><li>List item</li><li>List item</li></ul> <!-- List items are separated by a single space each --><ul class="inline"> <li>List item</li> <li>List item</li></ul>
  2. There's no need for an intermediate function, just pass a string to the alert() right where it's being called. <input type="button" onclick="alert('Something')" value="Message" /><input type="button" onclick="alert('Something else')" value="Message 2" />
  3. You need to read up on scope in PHP.
  4. The problem is that you're using a colon ( : ) instead of a dot ( . ) to select classes. This is how you should have the selector: a.navbar:link
  5. Ingolme

    %; not pxs?

    A box is a rectangle on the screen. All containers are boxes. All boxes are representations of HTML elements.
  6. You might need to look into other forms of animation, it doesn't look like there's a solution for this.
  7. You're using document.ready after the onDomReady event has fired. Remove the document.ready event.
  8. Ingolme

    %; not pxs?

    They can refer to the same element, but in different contexts. A container is always a box, but a box is not necessarily a container. "Container" refers to an element that contains other elements, a box refers to how an element is rendered.
  9. I don't think PDO uses mysql_error(). Have you checked the documentation for the PDO library on the PHP manual? I'm not familiar with it, but I would check to see where query results are given.
  10. Ingolme

    button help

    In the function that makes the bus slide in, when it's finished, call another function. Normally, animating methods should have a callback parameter which calls the function as soon as the animation is finished. I can't give an example since I'm not sure what you used to animate the bus.
  11. Internet Explorer 9 has Internet Explorer 8 and 7 rendering engines integrated, which you can access in the developer tools. The first problem I find is that you have <div> elements inside an <a> element, which isn't allowed and I can't predict how it would be rendered. The validator also shows that you have <h6> elements as direct children of <ul> elements. If you want a hyperlink to be a box, you should use CSS display: block. Hyperlinks can only contain inline elements, you can use <span> which is inline and give it display: block as well.
  12. You cannot hide Javascript. If there is any information that the client should not be seeing you must use a server-side language to deal with it.
  13. Ingolme

    %; not pxs?

    "Child" and "parent" are relationships between elements. In this example, <h1> is a child of <div>, <div> is the parent of <h1> <div> <h1></h1></div> Inline and block are two different rendering modes for an element. When an element is a block, it behaves like a box. If an element is inline, it will behave like text.
  14. Text only wraps when it finds spaces, punctuation or line breaks. You have a really long word there.
  15. If you give each <li> element an id attribute, you can link to it using a hash URL. <a href="#something">Go to "Something"</a>[ . . . ]<li id="something">Content</li>
  16. Yes, I can look at the site with Firebug.
  17. Ingolme

    %; not pxs?

    Both are good, it depends on where you're using them and what you're using them for. Different elements can use different units.
  18. The .post class has a top border. You can change the attributes of the border in the CSS stylesheet.
  19. It is very unusual to make a function that actually prints out something. You make it return a value and then use the value instead. Like this: function test($num) { if($num > 5) { return true; } else { return false; }}$n = isset($_GET['num']) ? $_GET['num'] : 0;if(test($n)) { echo "{$n} is greater than 5";} else { echo "{$n} is less than or equal to 5";}
  20. I think it's the only option. Unless your definition of "box" differs from what I have in mind.
  21. I thought you were referring to the menu at the top. The images that fade from one to another probably use a pre-made jQuery script. The theory behind it is to place one image in front of another, then gradually change its opacity from 0 to 1.
  22. I'm not sure what you mean. Do you mean one page on your website or one PHP page that serves multiple different pages?
  23. This site, apparently, has an embedded font which contains symbols they're using for the menu. They change the color of the text and symbol when the mouse hovers over the object. Something similar to this: .element:hover { color: #0080FF;} The dropdown menu is probably done with jQuery.
  24. CSS sprites. http://www.w3schools.com/css/css_image_sprites.asp
×
×
  • Create New...