We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    I’m having problems have my form validated in strict XHTML... Is it just me or is there a reason why my forms won’t validate?
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 27708 MODX Staff
      • 2,502 Posts
      Do you have a link for this? I’d like to see the source and be able to tell you.

      Cheers,

      Jay
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        Hey thanks for the reply.

        Basically the page is 100% strict XHTML 1.0 without the webloginpe snippet call. This is only a test page of some elements as I want to see if I can attempt and keep it strict for a learning process. With everything on this page it’s validated fine until I put the login form back in to the page. Maybe you can tell me why.... I don’t fully understand what the validator is telling me.

        http://www.rossco-designs.com/index.php?id=28


        Thanks!
        .

        **** UPDATE ****

        I took a look at the default templates and they validated. It didn’t like the breaks
        <b/> 
        they were not inside a div tag. With strict 1.0 do you have to make sure everything in with in a div? I was ending a div then putting breaks in between divs and then opening another after the breaks. Is this something I need to do is put breaks in tags from now?
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 10449
          • 956 Posts
          While you’re at it, why not fix the 2 CSS validation errors as well?
          http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fwww.rossco-designs.com%2Findex.php%3Fid%3D28

            • 27708 MODX Staff
            • 2,502 Posts
            Quote from: rossco at Mar 11, 2008, 04:00 AM

            With strict 1.0 do you have to make sure everything in with in a div?
            No but the
            element is an inline element. All inline elements must be in a block element of some sort and must not be between two block elements and not it a block element. So whether they are in a <p> or a <div> doesn’t matter.
            Quote from: rossco at Mar 11, 2008, 04:00 AM

            I was ending a div then putting breaks in between divs and then opening another after the breaks.
            Why?! grin There is absolutely no reason to use
            or empty <p> elements for spacing when you use CSS. The the only reason I can see to use a
            in XHTML and CSS is to actually force a line break in a typographical context like in the case of the closing of a letter or placing a person’s title in a line following their name. Why not use margin-bottom: 1em; for those divs that you want to have space between.

            I looked at your source code. I think you might want to learn about web standards. It doesn’t matter that you are "valid" if your code is a mess of
            elements. Your text should be inside of <p> elements as they are paragraphs. Use CSS to space them not
            elements. I know you are still learning but passing validation regardless of the actual document structure defeats the purpose of web standards. You miss the spirit of web standards which is to use elements for their purpose and not just to space the page. Headings go in <hn> elements paragraphs go in <p>. You have a fieldset in your content pane but the fieldset is supposed to be used to encapsulate form fields (a set of fields--fieldset). You have successfully accomplished what I would dub valid tag soup.

            I don’t mean to be hard on you, I read that you were going to or are taking a web dev/design class so you are still learning. You have made the same mistakes that I and others just starting out in CSS layouts does. Too many divs and not using the cascade in the stylesheet.

            If you are looking for help or want to lean more post about a help request in the XHTML/CSS forum.

            All the best,

            Jay
              Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub