SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Correctly nested but body element not allowed there?

    I have created a basic site for friends. But on pages where I use an inline frame I get a validation error. Take this page for example:

    http://www.discobarkadee.com/kalender.html

    It says that the body element is not allowed there. The problem doesn't seem to be the iframe because when I leave out that part it still gives me the error. Any ideas?

  2. #2
    Brevity is greatly overrated brandaggio's Avatar
    Join Date
    Dec 2005
    Posts
    1,424
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kadee
    I have created a basic site for friends. But on pages where I use an inline frame I get a validation error. Take this page for example:

    http://www.discobarkadee.com/kalender.html

    It says that the body element is not allowed there. The problem doesn't seem to be the iframe because when I leave out that part it still gives me the error. Any ideas?
    You are using an iframe not a frameset so you would use a transitional doctype like so (code has been validated):
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
      <meta content="text/html; charset=UTF-8"
     http-equiv="content-type" />
      <title>discobar Kadee kalender</title>
    </head>
    <body>
    <div id="wrapper">
    <div id="logo"></div>
    <ul id="menu">
      <li><a href="index.html">&bull; Home</a></li>
      <li><a href="fotos.html">&bull; foto's</a></li>
      <li><a href="kalender.html">&bull; kalender</a></li>
      <li><a href="gastenboek.html">&bull; gastenboek</a></li>
    </ul>
    <div id="content"><iframe src="http://www.google.com"
     frameborder="0" height="588" width="570"></iframe></div>
    <div id="footer">@copyright Discobar Kadee - <span>BTW
    BE 884.945.549<br />
    Kleine onderneming onderworpen aan de vrijstellingsregeling van
    belasting. BTW niet
    toepasselijk.</span></div>
    </div>
    </body>
    </html>
    As an aside, why not just use the bullets that are native part of a list rather than removing them and adding them back with &bull; as you have.

  3. #3
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for clarification about iframe/frameset. I'm not used to these.

    For the bullets, I let them slip in while I was testing all sorts of possibilities and I guess I ended up with bullets without thinking about using the native ones. Good suggestion.

  4. #4
    SitePoint Member
    Join Date
    Dec 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Small update about the bullets: they don't appear with display:inline. So I guess the most semantically correct thing to do would be to have a background image.

  5. #5
    Brevity is greatly overrated brandaggio's Avatar
    Join Date
    Dec 2005
    Posts
    1,424
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Kadee
    Small update about the bullets: they don't appear with display:inline. So I guess the most semantically correct thing to do would be to have a background image.
    Something along these lines:
    Code:
    ul li { float: left; margin-right: 2em; }


Bookmarks

Posting Permissions

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