SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru tombempty's Avatar
    Join Date
    Oct 2001
    Location
    New York
    Posts
    688
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Validation Issue I don't Understand

    Hello All:
    I have this clip of code that will not pass validation -
    HTML Code:
    body bgcolor="#E8E8E8" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#003399" onLoad="MM_preloadImages('images/homeb.gif','images/catalogb.gif','images/aboutb.gif','images/contactb.gif','images/copyrightb.gif','images/productsb.gif','images/orderingb.gif','images/homeb.gif','images/catalogb.gif','images/aboutb.gif','images/contactb.gif')">
    I am getting four errors that are attached to leftmargin, topmargin telling me
    that
    HTML Code:
    The tag contains an attribute that is proprietary to Netscape or Internet Explorer.
    The solution they offered is this -
    Most tags have a equivalent in standard HTML or CSS.

    But I do not know what to do to make this all validate.


    Thanks for any help,

    Paul
    ********
    Regards,

    P

  2. #2
    SitePoint Addict
    Join Date
    Jun 2003
    Location
    Barrie, Ontario, Canada
    Posts
    316
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    All of your margin attributes are depreciated.

    Use the css property "margin" to take care of the margins for your body instead. For example,

    Code:
     body { margin:0; }

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by tombempty
    The solution they offered is this -
    Most tags have a equivalent in standard HTML or CSS.
    That's right. These are presentational matters and should be handled by CSS, not HTML.

    Quote Originally Posted by tombempty
    But I do not know what to do to make this all validate.
    You can't! Those attributes are not part of any HTML standard. They are proprietary attributes made up by a browser vendor.

    Validation is not an end unto itself. What's the point in having a document that validates if it still uses bad old-school practices? Instead of trying to alleviate at the symptoms, try curing the actual cause of the illness. Do not use markup to control presentation.
    Birnam wood is come to Dunsinane

  4. #4
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    body bgcolor="#E8E8E8" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#003399"
    you need to move all that styling into a stylesheet as already stated.
    The above translates to the following for use in your css.

    body {
    background-color: #E8E8E8;
    color: #000000;
    margin: 0;
    padding:0;
    }

    you would then need to set up separate styles for your links... do not use the page properties in DW to set any of the above... that's your problem
    To set up basic links - take a look at:
    www.mako4css.com

    Nadia

  5. #5
    SitePoint Guru tombempty's Avatar
    Join Date
    Oct 2001
    Location
    New York
    Posts
    688
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Everyone,
    That helped me out a ton with understanding all that needs to be done.

    Paul
    ********
    Regards,

    P


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
  •