Web Analytics Made Easy -
StatCounter xhtml new to me - CodingForum

Announcement

Collapse
No announcement yet.

xhtml new to me

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • xhtml new to me

    Hi,
    First day with xhtml
    I am a visual learner and cannot find anything on line that gives written examples of code.

    I have a xhtml transitional page with errors.
    Can someone please give me a written example of what to add where?

    Error examples,
    Line 107 column 92: there is no attribute "bordercolor".
    ...ding="2" cellspacing="2" bordercolor="bordercolor"="#000000" bgcolor="#FFFFF.

    These are just 2 of the 12, I need to fix,
    If someone can help, could you please use red to the text you add?


    Thanks so much
    Adagio

  • #2
    Have you read much about XHTML? It is very like HTML but it's far stricter.

    XHTML focuses a great deal on seperating content from layout... all of those attributes and values above define how the page looks in HTML, therefore they are deprecated and not valid in XHTML.

    You need to use XHTML for your markup, with CSS for design and layout.

    http://www.w3schools.com/xhtml/default.asp
    http://www.w3schools.com/css/default.asp

    Oh, and don't even think about using tables for layout!
    markaylward.co.uk

    Comment


    • #3
      I think what the validator states is pretty straightforward:

      Line 107 column 92: there is no attribute "bordercolor".
      ...ding="2" cellspacing="2" bordercolor="bordercolor"="#000000" bgcolor="#FFFFF.

      means that the bordercolor attribute in that tag (presumably a table tag) shouldn't be there. So delete it.

      To get that border color back on the table, you need to learn CSS. For tables, check this out:
      http://www.somacon.com/p141.php

      However, are you sure you want to go with XHTML? You might be better off using HTML 4.01 for many reasons. Do a google search for "XHTML vs HTML"

      Comment


      • #4
        Hi,
        LOL
        I am knee deep in xhtml books from the library
        But,
        I picking up some...
        Fixed all my errors and page validates
        Now...
        Do you know how I might do this, with your suggestion of css instead of tables, if I have a table:

        <table align="center" border="1" bordercolor="#ACCAE1" width="320" height="150">
        <tr><td width="100%">
        <p align="center">
        <img src="images/tnsholat1.jpg" width="84" height="99" style="border: 3px solid #FFFFFF">
        <img src="images/tnsholat2.jpg" width="84" height="99" style="border: 3px solid #FFFFFF">
        <img src="images/tnsholat3.jpg" width="84" height="99" style="border: 3px solid #FFFFFF">
        </p>
        </td></tr>

        If I create a box at 100%, my width is 515px, do I create a second class to apply to each of the 3 images? Can I put a class inside a class?

        Or do I add, what to the first box to control the spacing of the 3 images?

        I usually do use html, a new template is xhtml, so I thought I would just stick with that.

        Thanks!

        </table>

        Comment


        • #5
          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 http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
          <title>Untitled Document</title>
          <style type="text/css">
          .thumbs {
          width:320px;
          margin:auto;
          height:150px;
          line-height:150px;
          border:1px solid #ACCAE1;
          }
          .thumbs ul {
          margin:0 auto;
          padding:21px 0 0 0;
          width:270px;
          height:105px;
          list-style:none;
          }
          .thumbs ul li {
          float:left;
          font-size:0;
          line-height:0px;
          }
          .thumbs ul li img {
          border:3px solid #FFF;
          }
          </style>
          </head>
          <body>
          <div class="thumbs">
          	<ul>
          		<li><a href="#"><img src="images/tnsholat1.jpg" width="84" height="99" alt="" /></a></li>
          		<li><a href="#"><img src="images/tnsholat2.jpg" width="84" height="99" alt="" /></a></li>
          		<li><a href="#"><img src="images/tnsholat3.jpg" width="84" height="99" alt="" /></a></li>
          	</ul>
          </div>
          </body>
          </html>
          ||||If you are getting paid to do a job, don't ask for help on it!||||

          Comment

          Working...
          X