Jump to content

ShadowMage

Members
  • Posts

    3,476
  • Joined

  • Last visited

Everything posted by ShadowMage

  1. I can see valid reasons for both sides of the story. However, I think I have to lean more towards including the <head> right from the start. They don't have to go into detail about what it's for, just simply that it's required and that it can't have content tags in it. Then, in the advanced section they can explain the true purpose and the various tags it can contain.
  2. "The guy" in that blog is our very own Dierdre's Dad. Sophox is his blog. This is the very reason I trust the content there. I don't think he mentions anything about having a fallback, but that is definitely something to keep in mind.
  3. Check out this link:http://www.sophox.com/wordpress/?p=1028
  4. Why not start by looking up the functions that birbal and Ingolme pointed you to? See how each function works and how it's used and try to come up with something on your own.
  5. Ok, now let's style it. First, add the inline stylesheet (embedded stylesheet) to your page. Place the following between your opening and closing head tags: <style type='text/css'></style> Then start writing the code to style your page. You can add classes and id's to the elements you want to style, or you can just target individual tags. I'd recommend giving a class/id to at least the form. If you don't, and you reuse the stylesheet for other pages, every single form on your site will use the styles you set. If that's what you want, then by all means, use a normal tag selector so you don't repeat code. So...if you want your sign up form to be unique, give it an id: <form method="post" id='signup_form'action="http://www.yourfuture2012.co.uk/future/register.php?list_id=1"> and place the following between the style tags you created earlier: #signup_form { ...styles...} Obviously replacing "...styles..." with whatever styles you want the form to have, such as a border or background. Now, you can use the form to drill down and target the table within it. Using the form to target the table makes the styles unique to that table (since the form has an id and id's must be unique). #signup_form table { ...styles for the table...}#signup_form td { ...styles for cells in the table...} Remember, this code goes between the style tags. If you want to use the same styles for all forms, just replace "#signup_form" with "form" and it will target all forms. You can also leave off the id from the form if you do this.
  6. This can be further demonstrated using a script placed in the body as well:<body><script type="text/javascript">document.getElementById("trial").innerHTML="This is first Javascript";</script><div id='trial></div></body> The above will fail because it's trying to access an element before the element has been created. JavaScript runs as soon as it is encountered, no matter if it is placed in the head or the body. This is why it is often recommended to place scripts at the end of the body right before the closing tag or in the head but wrapped in an onload handler.
  7. Well, you did add another row. An empty one. What I meant was to add the row and all the content of that row. Ie, the cells (td) and appropriate labels and input boxes. The form we're editing has four rows: one for the header, one for the user's name, one for the user's email, and one for the button. The form we're trying to create has five: header, name, email, country, and button. You need to add the row for the country. You should be able to figure that out without me having to walk through adding each element. It's exactly the same as the name and email rows. Also, you didn't completely remove the CSS and JS references in the head. There are some remnants left on lines 9 and 10.
  8. That's usually a good way to go about troubleshooting problems. It can pinpoint where the problem actually is. As for the lag however, JavaScript-powered animations and such are pretty vulnerable to lag issues. JS is not really optimized for that sort of thing. The reason you're seeing the lag only when the mouse is moving is probably due to the onmousemove event firing. That event fires many, many times per second. The sheer number of times it fires is enough to lag a JS intensive application, and the effect is multiplied if you have a handler registered for that event. EDIT: Ah, I see you already figured out your lag issue...
  9. Sorry, I misunderstood your last post. Ok, using the code from post 25, we can start by deleting the div on lines 13 - 21. You don't need it. You can also remove the links to the JS and CSS on lines 7 - 10. You'll be creating your own styles and functions and linking to them instead. Then, let's focus on modifying the form. Don't worry about styling it yet, just get the structure. The form starts on line 56 and goes to line 86. Add another row to the table nested within it.FWIW, though, you still should go through the tutorials and recreate this page. Even with the code in post 25, there are a number of things that are not considered best practice or recommended. For example, the use of tables to layout the page. Even though it isn't technically "wrong" or "invalid" it is still not considered best practice and thus not recommended. I am only stepping you through this to get a "working" page, and to give you a little practice with CSS and HTML.
  10. Got the desired result using the following: <div id='test'><span>asd asdf jkad la jdfalkjdf asldk lsid f aliwy ailaydys liaysd ifas asydi slkdf</span></div> #test { width: 200px; text-align: right; overflow: visible; white-space: nowrap; border: 1px solid black; position: relative;}#test span { position: absolute; right: 0px;}
  11. Well, if you insist on using post 24 as your base the first thing you'll need to do is straighten out the head tag. There's a lot of funk there:- Get the <meta> and <title> tags on lines 10 - 12 out of the <style> tag.- Remove the empty <title> tag on line 14.- Remove the closing </head> tag on line 15.- Remove the extra <body> tag on line 16. If you need the styles from it, move those to the other <body> tag (line 75).- Move the content tags on lines 17 - 30 to the body (should be an h1 and an h2).- Add a closing </script> tag to the <script> starting on line 31. When you get those done, repost your code.
  12. The correct terminology is descendant and child. The descendant selector:div pwill, as mentioned, select all p elements located within the div including those nested in other elements within the div (ie, p elements that are descendants of the div) The child selector:div>pwill select only those p elements which are directly within the div and not nested within any other elements (ie, the children of the div)
  13. I have the following test code: <!DOCTYPE html><html><head><title>Test</title><style type='text/css'>#test { width: 200px; text-align: right; overflow: visible; white-space: nowrap; border: 1px solid black;}</style></head><body><div id='test'>asd asdf jkad la jdfalkjdf asldk lsid f aliwy ailaydys liaysd ifas asydi slkdf</div></body></html> I thought that by aligning the text right, it would flow out the left side of the box. I was wrong, it still goes out the right side. How do I get it to go out the left side?
  14. ShadowMage

    Pc cleaner?

    Ok, so data, AFAIK holds absolutely no connection to the registry. So data can be transferred to any installation of Windows or partition of a computer without problems. We're on the same page there. I still don't understand, however, why applications matter. You mention "extra files" or registry keys that applications rely on to recreate their old setups. I'm not sure why this would..................................wait, just had an epiphany. I think we had a little misunderstanding of a Windows reinstall. I think what you were talking about is reinstalling and wiping out only the partition on which the OS resides. This makes sense because that would indeed leave behind applications and "extra files" on the data partition. When I was thinking of reinstalling Windows, I was thinking about wiping out everything including data partitions which would not leave anything behind.Case closed.
  15. ShadowMage

    CSS Word Wrap

    Can you post the output HTML?
  16. ShadowMage

    CSS Word Wrap

    What if you just get rid of the white-space property? By default, spans should wrap to a new line when they cannot fit on the current line (since they are inline elements).
  17. ShadowMage

    Pc cleaner?

    By data, I'm referring to actual data files created by a user such as Word or Excel documents, text files, AutoCAD DWG files, PHP files, or in my case the save game files from my various games. Not settings or anything else. I can see where settings files and that sort of thing would rely on registry keys but I've never had any problems with data files. Perhaps this is, again, because of my limited scope. Anyway, the theory behind keeping the OS separate is that it will run faster if it doesn't have to search through a bunch of application files as well as its own files. Also, I have two HDDs and the one on which my OS is installed is not very big so I want to limit the amount of stuff stored on it.
  18. Technically, the property -moz-transform doesn't exist. Unless you're using FireFox. Any property with a vendor prefix (-moz, -ms, -o, -webkit) is going to be "invalid" according to the validator because those aren't standard properties. They are vendor specific properties. However, due to the current "work-in-progress" status of CSS 3, it is necessary and "valid" to use these properties if you want to use the new features of CSS 3. Even if you do not use CSS 3, there are a few properties (such as filter for IE, which is commonly used for opacity in IE8 and down) that are vendor specific and will not validate. It is for this reason that I can't imagine many people do actually validate their CSS. I never do, at least.
  19. By post 24, I mean this post. In the upper right corner of each post there is a number. If you look at the post I linked you'll see it's post #24. The extra closing head tag is on line 15 (the other one is on line 74). However, you have an extra body tag and a bunch of other content tags (h1, h2, etc.) between those two head tags as well as a bunch of meta tags. The meta tags belong in the head, the content tags do not. Did you look at my suggestions in post 26? The code in post 25 looks valid so if you want to work through this, let's start over using that code and we can take it one step at a time making the changes you need to make. This will be far easier than trying to fix all the errors from the code in post 24.
  20. ShadowMage

    Pc cleaner?

    Ok, but after reinstalling Windows and obliterating the registry, you would also need to reinstall any software, which would then recreate any registry keys it needs to operate would it not? It'd be just like installing the program for the first time (and is the first time as far as the OS is concerned). I just can't see where any problems would arise from this sort of thing. Unless you're talking about restoring files and settings from a backup utility...? That I could maybe see causing issues, but I never use any sort of backup utility. I always manually grab any data that I need before doing a reinstall.
  21. It depends on which DTD you're using on your page. HTML DTDs will only accept the >, as in <img ... > while XHTML DTDs will only accept the />, as in <img ... /> HTML 5 is the exception which will support either > or /> so neither one is more correct, though some would recommend using > just because it is an HTML DTD.
  22. ShadowMage

    Pc cleaner?

    Define "reinstall". In my mind, a reinstall is a complete clean installation, which would completely obliterate the registry anyway, right? Yep. That's how I know it isn't deleting anything it shouldn't. It mainly sticks to the temp file directories and internet caches. That's right. I forgot you work at a computer shop. I work in IT, but my scope is pretty limited. I work with only what we (IT) set up our users with, where you work with whatever any random user decides to do with their computers. I can imagine you've seen some pretty scary things.
  23. ShadowMage

    z-index

    Then I'm guessing the problem is because your browser doesn't properly support negative values. You can just set the z-index of the image to 0 and set the z-index of the text to something higher.
  24. ShadowMage

    z-index

    What browser are you using? Does the same problem occur if you use a positive number or 0 for the z-index? I've heard that some browsers have issues with negative values. I'm not sure what sort of issues, but maybe this is one of them.
  25. Well, it doesn't appear to have changed much since the last time you asked this exact same question, so my suggestion is to use the suggestions you were given then. And quit asking the same questions over and over and over and over....
×
×
  • Create New...