Grow your CSS skills. Land your dream job.

[RESOLVED – Thanks Apostrophe!] Question about DOCTYPES…

  • # July 17, 2009 at 12:49 pm

    Hi guys,

    I’m building a portfolio/freelancing site at the moment that is several pages long. I have specified all the pages as ‘XHTML Strict’ and have been working to get them all validated.

    I’ve run into a problem now on the pages where I load in a contact form using PHP – the contact form PHP file throws up over 45 errors! If I change the DOCTYPE to ‘HTML Transitional’ this knocks the errors down to 10, and those errors just seem to be caused from switching from XHTML to HTML and are easily fixed.

    So, my question is, is there a problem if 2 of my pages (homepage and contact page) are specified as HTML Transitional and the other pages are ‘XHTML Strict’? Or should I change everything over to HTML Transitional? Or should I work at getting the contact form PHP file adhering to Strict?

    Here is a link to the PHP file that is causing me the problems:

    http://www.minusfront.com/includes/contact_form.php

    And here is the contact form XHTML Strict page that it’s causing errors on:

    http://www.minusfront.com/contact.php

    Any help you can give will be much appreciated!

    Dean

    # July 17, 2009 at 1:00 pm

    Hey Dean,

    Keep it on strict and try to work the errors down as much as you can.

    It looks like all of the errors are coming from the mark up of the form itself. I’m no form expert, so I can’t particularly help you there, but I’m sure someone else will chirp in.

    # July 17, 2009 at 1:04 pm

    Thanks Doc, I don’t know a lot about forms either which is why I bought this one off Theme Forest. Bit bummed that it doesn’t validate right out of the box :(

    I would prefer to keep it all as Strict so I guess I’ll keep working at it…if anyone can help me out with the form markup that would be great!

    # July 17, 2009 at 3:14 pm

    Hmmmmm, that’s odd indeed.

    I see you left a comment on the item about it, I’m surprised nobody else has brought it up yet.

    # July 17, 2009 at 3:55 pm

    Yeah, that’s just shoddy markup. I thought Themeforest were supposed to be on the lookout for this type of thing.

    Here you go, this validates as xhtml strict:

    Code:



    * SPAM protection:


    All fields are required (but don’t worry, I won’t pass your details on to anyone else).

    # July 17, 2009 at 4:09 pm

    Apostrophe, that is absolutely brilliant mate! Thank you so much!!!

    Everything is valid and peachy now :)

    http://validator.w3.org/check?uri=http% … or%2F1.654

    # July 17, 2009 at 4:30 pm

    Aww, shucks. ’twas nothing. :oops:

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".