Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Shonumi

  • Rank
  • Birthday 12/15/1988

Previous Fields

  • Languages
    C++, Java, PHP, Javascript, Actionscript 2.0, XHTML, CSS, XML, SVG, SQL

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location
    Chicago, Illinois
  1. There are several different ways in which this can be handled. You're doing something by hand that would ideally be handled by a scripting language. I'd say you should look into something called PHP, a sever-side scripting language that allows you to do things behind the scenes when, for example, a user clicks on a link and is taken to another page. For this, you would basically be using PHP to access a database on your website, usually MySQL to get a list of all the files available for the user to look at. You would then have to program the script to sort based on what the user wants, in this case the author or the month; from there the script would generate an HTML page (PHP can be used to write the HTML before the user sees it) with everything ready to go. The PHP script would use the database to make HTML links on the fly.A second option would be to use a client-side scripting language like JavaScript and it could read in an XML that contains links to all of your articles, along with the dates and authors. Your script could sort them out based on whatever the user wants and then generate a page of links by altering the current page's HTML. Of the two, I'd go for the first as it's more commonly implemented and PHP can't be disabled from the user-end unlike JavaScript. There are dozens of other options to consider, but these are the two I've found to be most convenient. With each, though, you'll still have to update the database or XML file whenever you add more content and articles. But because you'll have a sorting script, you'd need only input basic information once, regardless of where in the database of XML file you put it in. Either way, it's far less work than what you're doing now.W3Schools has all you need to get up and running with PHP and MySQL.
  2. As far as I know, CSS should work just fine. All you're going to need to do is change the color CSS property. Something simple like this works for me. option.red {color: #FF0000;}... later in the actual HTML ...<select><option class="red" value="whatever">Some Red Option Text</option></select> The only gotcha that you might encounter is that in FF, the actual select element itself won't change its color depending on the color of whatever option element is chosen. For IE and Opera (haven't got Safari or Chrome on my machine right now, can't test them), the text of the parent select element does change its color corresponding to the select element that gets highlighted. In FF, it appears as black or whatever default text color has been set by CSS. You can change the CSS of the select element to always default to a certain color, or if you want to ensure that FF and possibly other browsers choose the same color as the option element, a quick bit of JavaScript would help you out.
  3. Shonumi

    How To Embed A Font?

    The only current W3C standards compliant way is to utilize CSS3, using the @font-face. It basically lets the browser download the font from a url and use it for the web page being displayed. Of course, you will need a browser that supports CSS3. As far as I can tell, the latest versions of FF, Opera, Chrome and Safari should all support this, IE is a no go though. 4/5 for the major browsers isn't too bad though. Check out the link for the W3C document and example code.W3C CSS3 @font-face
  4. Specifically, you want to be looking at the text-decoration property of the anchor elements. /* In the CSS */.link_class {text-decoration: none;}/* In the HTML */<a class="link_class" href="google.com">Click To Go To Google</a> Note that you wouldn't in this case have to set up a specific CSS definition for .link_class:hover, because the .link_class here already covers it. If you want underlines only when a mouse hovers over it, then you would need something like this in the CSS .link_class:hover {text-decoration: underline;} Check out the text-decoration CSS property here.W3Schools Text Decoration
  5. Shonumi

    Firefox Coding Help

    Additionally, a very good place to start is to make sure your page can be validated by the W3C web standards.(X)HTML ValidationCSS ValidationYou'd be surprised how much of a difference correct coding makes in leading to cross-browser compatibility. Also, I hope one of those "other browsers" includes a version of Opera. It's Error Console is more robust in some ways than Firefox's as it cites specific lines numbers usually along with a snippet of the offending code. Plus it allows you to divide the errors into categories, e.g HTML, CSS, JavaScript, XML, etc.
  6. The CSS just needs some adjustments. .loginboxdiv { /*for the white background image box*/ margin-left:auto; margin-right:auto; /* You can combine margin-left and -right to be just "margin: auto;" if you want to, it works out to be the same thing. */ height: 21px; width: 146px; background: url(Buttons/login_bg.gif) no-repeat bottom; text-align: center; }.loginbox { /*the actual text box*/ /*You had an extra "background:none;" right here */ border: none; /*Get rid of this line "position: absolute;" that's conflicting with what you want to achieve */ background: none; width: 134px; height: 15px; margin-top: 3px; /*Since you set the div loginboxdiv to "text-align: center;" the input will be centered. You don't need to have a "margin-left: 6px" here */ padding: 2px 7px 0px 7px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; text-align: center; /*I don't know what you're doing with the images, but it works fine for me without using a z-index */ } Hope this helps you out. It works in FF for me, I don't have Chrome or any WebKit browser to make sure it properly renders as you want it, but take a look at the CSS above.
  7. I don't believe there is a limit to how many you can put on one element per se, but realistically, you're only ever going to use a certain amount. I can't imagine that you'd be using 20+ classes on a single element. Anyways, IE6 supports this, but I don't think anything less than that will support it. The main thing you want to worry about is inheritance and making sure you've got everything correctly deriving what's what.
  8. I had a similar project like this that I did for myself a while ago. It had 550+ items in it, but loading all of these would have been a major pain in JavaScript. I didn't want to dabble with AJAX (because it was unnecessary for the case) so I stuck with JavaScript + DHTML. The trick was getting the data to the JavaScript. My solution was to load the data up as XML and parse it into arrays. This worked splendidly well. XML data, at best, shouldn't be measured in anything more than kilobytes, so downloading the file was fairly quick and didn't zap any of the browser's resources. Instead of having to query up or make a request to another page or database, the all of the information was loaded up in one shot. Having the data separate from the JavaScript code reduced a lot of headaches and was easier to maintain.Particularly, when your data is static and small enough, I find it better to do XML + JS + DHTML. The code for getting your data is a bit less tricky and more straightforward than in making your own AJAX scheme. My project required not just the use of text, but images as well. In the XML I just added a parameter to the tags that had the location of the image on the server, and the JavaScript took care of the rest. You can do the same with those ID numbers, as XML will allow you to have as many parameters as you need, and it's quite flexible. To me, AJAX just seems like too much for somethings that just need to get the data to the code. If you are dealing with gross amounts of data, then I would suggest AJAX, perhaps using a PHP page to request an SQL database. But if not, I wouldn't bother. Then again, if you really want to experiment with AJAX, this would be an opportune learning time.Note however, I still made use of the XMLHttpRequest, but that in and of itself isn't AJAX. In my case, there wasn't an asynchronous request to another page, and my page sent nothing back to the server, so it acted pretty much as a standard HTTP download. There wasn't a need to use AJAX in its fullest sense because that data didn't change, I just needed to download it.
  9. Shonumi

    Need Help

    Sure there are. All you have to do is search "Free Web Hosting" in Google.For just simple HTML & CSS, http://www.110mb.com/ is good enough to start.
  10. Although what thescientist said should get you all the way through, you can also open the HTML file in IE, right click anywhere on the page and it'll open the source in Notepad and you can edit it, save it and reload IE to see how it's working out.
  11. There's technically a difference between looking good i.e. clean, organized, and well structured, versus actually performing worse, acting less efficient or adhering to bad practices. I would suggest that of course your code is going to visually look different from the examples you looked at. Those are full fledged projects or products of some sort, I wouldn't doubt that at least some of the code was written by someone who has a professional background or has at least paid for a class or two. Your code probably just has a different style to it, everyone's does. I could "View Page Source" on this page right now, and just because it doesn't look like what I would do for HTML and CSS, that doesn't mean I have terrible skills, I've just developed a different way of applying those skills. No one can really judge your level or where you are without seeing code, so perhaps an example page would help us help you to see if there's anything you're not getting right. If you've been programming for 3 years already, it's probably just minor details that you need to shape up on when it comes to PHP.A good way to observe where you are with your skills is just to keep trying projects that you think are difficult. Accomplishing something is part of having good skills, not just knowing how to string together good looking or well formed code (though that is an important part too, they go hand in hand).
  12. My advice to you is to first of all code to the appropiate web standards. Always check that your web pages validate. Validation is, in most cases, 9/10 of the job done right, the rest is nuance between browsers, which will be easier to track down with valid code. I develop my pages initially in Opera because I find this has several advantages. Opera's a standards-tight ride, so if I mess it up there, I'm bound to do it everywhere, and if it get it right, chances are I've done so for the rest of the browsers. Technically, you'd probably be best off with a build of WebKit that'll get 100 on an Acid 3 test, but that may be taking things to an extreme. Opera also has an error console, which is standards based, and can act as a good debugger. It even seperates HTML errors from CSS and such, no addons/extensions needed. Also, the one click page validation is quite handy. While I may seem to be making a case for Opera over other browsers, I'm not, I'm saying you've got to back yourself up with a platform that's built around standards so that your code is error free to begin with.
  13. Shonumi

    Font Help

    I remember seeing something about this situation when Safari released with support for the working draft of HTML 5 and CSS3. The browser let's CSS handle loading fonts on the fly. To my knowledge Safari and Opera both support @font-face, not sure of Firefox, and most certainly not IE. You might wanna take a look at it over here.http://www.w3.org/TR/css3-webfonts/#font-descriptions
  14. If you're completely new to programming in any sense, it really shouldn't matter between JavaScript or PHP if you're interested in just learning something to make your website more dynamic; the level required to learn the basics of both are relatively the same, mostly due to their similar syntax. The main difference is whether you're after a more client-side orientated operation for web pages, where the browser itself is doing most of the work, as opposed to a server-side orientated operation where the server handles how things work. I prefer to think of JavaScript as "light work" and PHP more of a "heavy dutyIt's a question of usage in my opinion. I'll use JavaScript when I want the page itself to be dynamic, and when the document doesn't need to have access to any outside data aside from perhaps and XML file. While JavaScript is great for making on-the-fly changes to HTML, it can't do much with data; the language prohibits writing to files with only limited exceptions, and its rather hard to build to simulate a database on cookies alone, especially with their temporal nature. This is where PHP comes mighty handy, as in conjunction with an SQL database, managing information this way is alot more efficient. PHP is certainly more reliable compared to JavaScript as the user has no way to disable PHP. But, making changes to an existing page in front of the client with PHP isn't nearly as elegant and simple as it is with the DOM.But that's not to say the two are mutually exclusve. You can learn (and probably should learn) the two of them and you can even implement them on the same page. Both in my opinion are rather extensive languages with a lot of depth. I prefer to think of JavaScript as "light work" agent that gets simple things done quickly with a nice level of interactivity and PHP more of a "heavy duty" agent that does similar tasks but hold a lot more data work potential and management. So like I said, it's a question of how you want your website or your skills to be used.
  15. You could save all the topics of your interest as strict HTML files, any browser should be able to do that from File->Save As. But that's going to be long and tedious if you want a good majority of W3Schools tutorials. If you're still going to be working offline anyway, you can view everything you need now, and your browser's cache would store them for later retrieval, assuming it doesn't clear out the cache when you close the browser.
  • Create New...