SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict RapidGaming's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XHTML 1.1 Problem (map)

    I have:

    Code:
    <map id="ql" title="quicklinks">
     <area shape="rect" coords="7, 4, 40, 35" href="xbox.php" alt="RapidGaming" />
    </map>
    It's displaying the error:

    Line 27, column 31: document type does not allow element "map" here; missing one of "ins", "del", "h1", "h2", "h3", "h4", "h5", "h6", "p", "div", "pre", "address", "fieldset" start-tag

    <map id="ql" title="quicklinks">
    Any ideas please??

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Put the <map> element inside of something, like a <div>. Basically it's telling you that you have an inline element, but no block-level element to contain it.

  3. #3
    SitePoint Addict RapidGaming's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Perfect thanks. That's 4 errors fixed.

    Could anyone help me with any of these problems please (such as alternatives on what can be done in this case). Please remember this is validating using XHTML 1.1.

    One:
    Line 40, column 13: there is no attribute "align" (explain...).

    <table align="center" width="770" border="0" cellpadding="0" cellspacing="0">
    Two:
    Line 46, column 15: there is no attribute "width" (explain...).

    <td width="193">
    Three:
    Line 57, column 152: there is no attribute "border" (explain...).

    ....jpg" width="263" height="55" border="0" usemap="ql" alt="RapidGaming" /><img
    Four:
    Line 79, column 29: there is no attribute "background" (explain...).

    <td width="143" background="images/navbg.jpg">
    Even if you can just help on one, please do let me know.

    Thanks,
    Scott

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    1. CSS: look at the text-align property.
    2. Set the width in your CSS file.
    3. Use CSS's border properties.
    4. Use CSS's background properties.

  5. #5
    SitePoint Addict RapidGaming's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi vgarcia, thanks for the prompt reply. I don't understand how it can be done via CSS. I don't want all <td>'s widths at 193, etc.

    Please let me know

    Thanks
    Scott

  6. #6
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by RapidGaming
    Hi vgarcia, thanks for the prompt reply. I don't understand how it can be done via CSS. I don't want all <td>'s widths at 193, etc.

    Please let me know

    Thanks
    Scott
    Give the <td> a unique ID. An example is below:
    HTML Code:
    <td id="mycell">Text</td>
    Then style that ID with CSS, like so:
    Code:
    #mycell {
      background-color: silver;
      color: navy;
      width: 193px;
      font-weight: bold;
    }
    See?

    Now onto a deeper issue; if you're still designing the "old way", I suggest a more lenient flavor of XHTML than XHTML 1.1, which is the strictest interpretation of the standard available. Use XHTML 1.0 Transitional if you want to keep some of your layout stuff in the HTML and not in the CSS; you'll find it much easier to deal with.

  7. #7
    SitePoint Addict RapidGaming's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    204
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, I'll have a go with the CSS.

  8. #8
    SitePoint Zealot lord's Avatar
    Join Date
    Nov 2003
    Location
    sLOVEnia
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RapidGaming
    Thanks, I'll have a go with the CSS.
    offtopic:

    do you use usemap="#q1" in your code?
    If so I would like to see how you done it. I want to validate my page, but because I use usemap="#q1" the validator refuse to use #.

    If I don't use # the code is not working.

    have a nice day
    maxx


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
  •