Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript and css

    Hi everyone, I am a beginner with css, and have been doing well with learning this. I decided to place a card online for christmas for my family and friends.

    I also wanted a snow script, which I have on the page.

    My question is that I use the xhtml transitional doctype, and when using the script it doesn't work. I have to go back to the html doctype.

    Also I would have liked to have linked this to the page as well as my css for the page but this would not work either.

    I'm not familar with javascript, so any help would be appreciated as far as guidance for a really easy tutorial for inserting scripts and also for making them css compliant, if that is actually the term that I am looking for.

    Here is the link for the page
    http://c.1asphost.com/c1sissy/merry%...yChristmas.htm
    Some people are informing me that on their browsers t he page is going goofy. However, on my pc I tested on NN7, Mozilla, Opera, and IE6, all recent browsers and didn't have a problem.

    Thanks in advance, and I believe this is my first posting here in this forum, though have been a lurker for a long time.

  • #2
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not too bad for a newcomer. Although in Mozilla (Firebird, Netscape 7, etc) the positioning is a bit off. You can't read part of it. Shouldn't be too hard to fix though.

    But I have to say that this:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    ... is not a valid DOCTYPE for HTML 4.01. However, this is:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    Although this XHTML one should be better if you wanted to go that route.
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    Now, I know you said that it wasn't working for some reason with the XHTML DOCTYPE. However, I can't see it, so I wouldn't know what's wrong and how to fix it. Could you post a page using the proper XHTML DOCTYPE so I could take a look?

    Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.

  • #3
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not too bad for a newcomer
    Thanks, I have actually been working at teaching myself for about a year or more now. Long hard road to travel, lol.

    Thanks for your answer so quickly! I didn't think that I would hear anything until maybe friday!

    I'll do a page on friday with the xhtml version and put it up on the site.

    For some reason the snow script won't work with the xhtml. I'm not sure if there is a stricter script that is xhtml compliant?

    Thanks again!

    btw, Merry Christmas
    Last edited by c1sissy; 12-24-2003 at 07:31 PM.

  • #4
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,
    I fixed the doctype, however the following are the errors that I am recieving.
    Below are the results of attempting to parse this document with an SGML parser.

    Line 6, column 22: document type does not allow element "STYLE" here (explain...).
    <style type="text/css">
    ^
    Line 76, column 6: end tag for element "HEAD" which is not open (explain...).
    </head>
    ^
    Line 78, column 5: document type does not allow element "BODY" here (explain...).
    <body>
    ^
    Line 79, column 32: required attribute "TYPE" not specified (explain...).
    <script language="JavaScript1.2">
    ^
    Line 210, column 17: document type does not allow element "P" here (explain...).
    <p align="center">
    ^
    Line 210 is out of my control as this is placed in here by my host. I unfortunatly am not able to do anything about this.

    If I'm using an embedded style sheet, why does this show up as not being valid? Is this not usable in html? Or is this placed wrong?

    Thanks in advance


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •