locked
Compatability issues RRS feed

  • Question

  • I did a compatability test on all pages of my website and came up with two common incompatabilities, repeated on several pages.  When I looked at them in code, one refers to an image alignment and the other refers to shape_"polygon".  The problems were created when I selected menu items, not code I wrote myself. 

    Here are the compatability messages:

    Page Line Issue Type Schema Problem Summary
        100 Incompatibility XHTML 1.0 Transitional The value of 'shape' attribute is marked invalid because it's not supported by the current schema.
      63 Incompatibility XHTML 1.0 Transitional The World Wide Web Consortium now regards the attribute 'align' as outdated. Newer constructs are recommended.

    Thanks for your help.
    Tuesday, August 26, 2008 11:04 PM

Answers

  • The XHTML specification requires shape='poly', not shape='polygon'. You are right that xWeb creates this invalid attribute value. This is a bug. On the other hand, most browsers seem to support polygon as well.

    <img align='left' /> can be replaced by <img style='float: left;' />. Are you sure that xWeb did create the align attribute? This should not happen. Can you provide reproduction steps?
    Tuesday, August 26, 2008 11:23 PM
  • The correct style for table cell content would be:

    text-align: center

    The "float" style is used with elements such as divs and images, which by default want to be on a line by themselves, to "float" to the left or right of any content inside the same containing block.

    HTH
    Kevin Spencer, Chicken Salad Alchemist
    Wednesday, August 27, 2008 11:45 AM
  • I might also add that if you're putting a block-level element, such as a div, inside a table cell, and want it to be centered, set the margin-left and margin-right to "auto" for that element. This also works inside any other containing block.

    HTH
    Kevin Spencer, Chicken Salad Alchemist
    Wednesday, August 27, 2008 11:47 AM

All replies

  • The XHTML specification requires shape='poly', not shape='polygon'. You are right that xWeb creates this invalid attribute value. This is a bug. On the other hand, most browsers seem to support polygon as well.

    <img align='left' /> can be replaced by <img style='float: left;' />. Are you sure that xWeb did create the align attribute? This should not happen. Can you provide reproduction steps?
    Tuesday, August 26, 2008 11:23 PM
  • Thank you.  That took care of both problems.

    As far as the alignment, I really can't remember exactly what I did; however, I know when working with images, often I will right click on the picture, select picture properties, select appearance, then select text wrap right or left.

    One more issue was buried within all of the other incompatability problems which you have just solved.

    This one deals with table cells.  I have the following code which has a problem.  The align="center" is incompatable.  I tried the style='float: center;' but it did not work:

    <table cellpadding="2" align="center"

    Thanks again for the quick reply and the previous solutions.

    If I can get these last things resolved, I hope to publish my website tonight.

    Tuesday, August 26, 2008 11:48 PM
  • The correct style for table cell content would be:

    text-align: center

    The "float" style is used with elements such as divs and images, which by default want to be on a line by themselves, to "float" to the left or right of any content inside the same containing block.

    HTH
    Kevin Spencer, Chicken Salad Alchemist
    Wednesday, August 27, 2008 11:45 AM
  • I might also add that if you're putting a block-level element, such as a div, inside a table cell, and want it to be centered, set the margin-left and margin-right to "auto" for that element. This also works inside any other containing block.

    HTH
    Kevin Spencer, Chicken Salad Alchemist
    Wednesday, August 27, 2008 11:47 AM