Jump to content
xisto Community

Tyssen

Members
  • Content Count

    1,159
  • Joined

  • Last visited

Posts posted by Tyssen


  1. I was getting a similar thing from one of my forms. All the spam was coming from online gaming sites and they kept copying their keywords into all the fields. So I set up a filter on the commonly used spam words and now I don't get it any more. (This was done in ASP, but the method will be the same for PHP.)

    'checks for spamDim spam, spamArrayspam = false spamArray = Array("poker", "viagra", "texas", "xanax", "holdem")for i=0 to 4	if (InStr(Request.Form("message"),spamArray(i)) > 0 ) then  spam = true	end ifnext
    You put the words you want to filter out into the array, then loop through the relevant field (in my case, the message field) a few times to see if any of those words are present. If they are, spam = true and the email doesn't get sent.

  2. OTOH, Google finds all those other pages, too, during a search, so maybe it just doesn't matter. If you have a popular page, promote it and be happy. Who cares if it's not your home page?

    I would've thought that. As long as visitors are ending up somewhere on your site, it's a good thing. If one of your sub-level pages ends up being more popular than the home page, it's still not a bad thing cos they're on your site which is what you wanted. But you might then want to look at why that page is more popular and then incorporate some of its content into your home page if possible.

  3. <meta name="description" content="" /><meta name="robots" content="index, follow" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

    These ones are important. Description helps formulate the description that search engines will place below your link in their results; robots tells the engine which pages to index and which pages to ignore (if you have content on your site that you don't want showing up in search results); and the http-equiv makes sure your pages are interpreted properly by browsers, so the last one is essential.

    <meta name="keywords" content="" /><meta name="Generator" content="" />

    You can forget these two. Search engines don't pay attention to keywords anymore and generator just tells the engine what you used to create your site which is hardly of any use to anyone.

  4. <div id="Layer1" style="position:absolute; left:15px; top:15px; width:400px; height:200px; z-index:1; background-color: #000066; layer-background-color: #000066; border: 1px solid #000000;"></div><div id="Layer2" style="position:absolute; left:10px; top:10px; width:400px; height:200px; z-index:2; background-color: #0099FF; layer-background-color: #0099FF; border: 1px solid #000000;"></div>
    One flaw with this method is that you've given absolute positioning to your first element. You can achieve the same result without absolutely positioning your first element like this:
    <div id="Layer1" style="width:400px; height:200px; z-index:1; background-color: #000066; layer-background-color: #000066; border: 1px solid #000000;"><div id="Layer2" style="position:absolute; left:5px; top:10px; width:400px; height:200px; z-index:2; background-color: #0099FF; layer-background-color: #0099FF; border: 1px solid #000000;"></div></div>
    The second <div> is positioned absolutely in relation to the first (ie it's inside the first div).
    I've just posted this in another thread, but it seems relevant to this one too: CSS dropshadows (with feathered edges).

  5. The easiest way to get the background hover to be the same size is just to put all those in a table like structure using divs like my site and just use the onmouseover part of the link tag to change the class of the div to a new class that has background color the one you want.

    That's not the easiest way - that's a harder way to do it. The hover element in CSS is there so you don't need to use javascript. :D

  6. Whats the different between using tables?

    The difference is that <div>s are used to display 'divisions' of content and tables are used to present tabular data. So when people started using tables for layout and presentation, they were using them for a purpose they were never intended. Semantically speaking (and according to the guidelines set down by the W3C), tables should only be used to display tabular data (the sort of data that would be held in a database - rows and columns).
    Tables also aren't as search engine friendly, nor are they as easy to use for people with disabilities (e.g. people using screen readers).

  7. He also said that that xhtml tag should go after the <head> tag in an html document.

     

    No, no-one has said that in this thread. Fair enough you were trying to bring the thread back around to HTML, but you should've explained why you were making the corrections as the only people who would find this tutorial useful are the ones who know absolutely nothing about X/HTML and therefore would be likely to end up using a combination of both if they didn't understand properly what the differences were. Then again, rvovk and I should've explained what we were doing better too. Could've saved us all a bit of typing (although it doesn't hurt the credit count :D ).

  8. <meta http-equiv="content-type" content="text/html;charset=windows-1250"/>
    If people are gonna be using the code he wrote (and thus using the langauge he wrote it in) it should be like this instead:

    <meta http-equiv="content-type" content="text/html;charset=windows-1250">
    If you're going to correct people, make sure the corrections you make are actually right. :D

    Rvovk has a / at the end of his meta http-equiv tag cos he's coding for an XHTML doctype, not an HTML one.

    Same goes for the example I posted:

    Same for the doctype declaration, which should be before the <html> tag not the <head> one:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional //EN"   "http://forums.xisto.com/no_longer_exists/;'>http://forums.xisto.com/no_longer_exists/;

     

    The <html> tag is in the XHTML doctype declaration (bottom line):

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"   "http://forums.xisto.com/no_longer_exists/ xmlns="http://www.w3.org/1999/xhtml/;

  9. One important thing was forgotten here. After title in head of HTML document there should be next code:

     

    <meta http-equiv="content-type" content="text/html;charset=windows-1250"/>
    And before your <head> tag, it is important to have a doctype declaration, e.g.:

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"    "http://forums.xisto.com/no_longer_exists/ xmlns="http://www.w3.org/1999/xhtml/;
    For a more complete reference on doctypes and why they are important, check out A List Apart.

  10. If you have high speed server and high speed internet connection you would even notice there was loading of 0.5kB image, but if you use preloader then everything is fine.

     

    You actually don't have to worry about preloading if you put both states of your image into one file.

    Then simply do something like this:

     

    a:hover { background:url(image.jpg) 0 -10px no-repeat; }
    where the -10px equates to roughly half the height of your image (in this case the images are stacked on top of each other but you could have them side by side and reposition them horizontally). So what you're doing is when you roll over the link, you're pushing the off state out of the way and replacing it with the over state.

     

    its ok but i don't use the image hovering anymore it more out of date for those that be doing it for awhile but could be useful for the beginning web designers

    Um, yeah, whatever you reckon mate. :D

    I think you'll find experienced web designers use the sort of technique rvovk has posted all the time.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.