1 Replies - 12596 Views - Last Post: 18 November 2010 - 11:34 AM

#1 destroyeroflords   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 5
  • Joined: 17-November 10

trying to make a calendar and i am not sure what part of code is wrong

Posted 17 November 2010 - 03:55 PM

trying to make a calendar and i am not sure what part of code is wrong
here is my code

<html>
<head>
<!-- 
   New Perspectives on HTML and XHTML
   Tutorial 5
   Case Problem 2

   February at the Chamberlain Civic Center
   Author: 
   Date:   

   Filename:         feb.htm
   Supporting files: bottom.jpg, bottomleft.jpg, bottomright.jpg, calendar.css, 
                     ccc.css, ccc.jpg, left.jpg, right.jpg, tab.jpg, top.jpg, 
                     topleft.jpg, topright.jpg
-->

   <title>February at the Chamberlain Civic Center</title>
   <style type="txt/css">
   </style>
   
   
   
<link href="cal.css" rel="stylesheet" type ="txt/css"/>
<link href="ccc.css" rel="stylesheet" type ="txt/css"/>
</head>


<body>
   <div id="heading">
      <img src="ccc.jpg" alt="The Chamberlain Civic Center" />
      <ul>
         <li><a href="#">Home</a></li>
         <li><a href="#">Events</a></li>
         <li><a href="#">Box Office</a></li>
         <li><a href="#">Facilities</a></li>
         <li><a href="#">Directions</a></li>
         <li><a href="#">Contact Us</a></li>
      </ul>
   </div>


   <div id="leftColumn">
      <h2>Coming in February</h2>
      <p>February will be another banner month at the Chamberlain Civic 
      Center with a two day performance of the Tony Award winning 
      musical, <i>West Side Story</i> by the Broadway Touring Company. 
      Tickets are going fast, so order yours today.</p>

      <p>Celebrate Valentine's Day with the Chamberlain Symphony and 
      their special selection of classical music for lovers. The next 
      day, exercise your mind by attending the Charles Dickens classic, 
      <i>The Mystery of Edwin Drood</i>.</p>

      <p>Jazz lovers have a lot to celebrate in February with a visit 
      from the <i>Jazz Masters</i> on February 10th, and then on February 
      21st, enjoy the music of The Duke with an <i>Ellington Tribute</i> 
      performed by the Jazz Company of Kansas City.</p>

      <p>Pins, bottles, plates, and chairs are flying at the Chamberlain 
      Civic Center in February. The <i>Taiwan Acrobats</i> return with 
      another amazing performance. Then, on February 25th, the <i>Madtown 
      Jugglers</i> get into the act with their unique blend of comedy, 
      juggling, and madness.</p>

      <p>Enjoy a classical brunch every Sunday in February with music 
      provided by the <i>Carson Quartet</i>. Seating is limited, so please order 
      your table in advance.</p>
   </div>


   <div id="rightColumn">
  <table class ="calendar">
   <caption>Events in February at the CCC</caption>
   <colgroup>
    <col class="Weekdays" span="5"/>
    <col class="Weekend" span = "2"/>
    </colgroup>
    
    <div class="tBorder">
     <div class="lBorder">
      <div class="rBorder">
       <div class="bBorder">
        <div class="tlCorner">
         <div class="trCorner">
          <div class="blCorner">
           <div class="brCorner">
            <div class="boxContent">
            
            
   <thead>
    <tr>
       <th>Sun</th> 
        <th>Mon</th>
         <th>Tue</th>
          <th>Wed</th>
           <th>Thu</th>
            <th>Fri</th>
             <th>Sat</th>  
              </tr>
    </thead>
    <tbody>
    <tr>
    <!--- Week one on calendar---->
    
     <td>26</td>
      <td>27</td>
       <td>28</td>
        <td>29</td>
         <td>30</td>
          <td>31</td>
           <td>1<dl><dt> Taiwan Acrobats</dt><dd>8pm $16/$24/$36</dd></dl></td>
    </tr>
    <!--- Week one/two on calendar---->
     <tr>
      <td>2<dl><dt>Carson Quartet</dt><dd>1pm $8</dd></dl></td>
       <td>3</td>
        <td>4</td>
         <td>5<dl><dt>Joey Gallway</dt><dd>8pm $16/$24/$36</dd></dl></td>
          <td>6</td>
           <td>7<dl><dt>West Side Story</dt><dd>7pm $24/$36/$64</dd></dl></td>
            <td>8<dl><dt>West Side Story</dt><dd>7pm $24/$36/$64</dd></dl></td>  
      <!--- Week two on calendar---->      
    </tr>
      <tr>
      <td>9<dl><dt>Carson Quartet</dt><dd>1pm $8</dd></dl></td>
       <td>10<dl><dt>Jazz Masters</dt><dd>8pm $18/$24/$32</dd></dl></td>
        <td>11</td>
         <td>12</td>
          <td>13<dl><dt>Harlem Choir</dt><dd>8pm $18/$24/$32</dd></dl></td>
           <td>14<dl><dt>Chamberlain Symphony</dt><dd>8pm $18/$24/$32</dd></dl></td>
            <td>15<dl><dt>Edwin Drood</dt><dd>8pm $24/$36/$44</dd></dl></td>
            
    <!--- Week three on calendar----> 
    </tr>
      <tr>
      <td>16<dl><dt>Carson Quartet</dt><dd>1pm $8</dd></dl></td>
       <td>17</td>
        <td>18</td>
         <td>19<dl><dt>The Yearling</dt><dd>8pm $8/$14/$18</dd></dl></td>
          <td>20</td>
           <td>21<dl><dt>An Ellington Tribute</dt><dd>8pm $24/$32/$48</dd></dl></td>
            <td>22<dl><dt>Othello</dt><dd>8pm $18/$28/$42</dd></dl></td>  
            
      <!--- Week four on calendar---->      
    </tr>
       <tr>
      <td>23<dl><dt>Carson Quartet</dt><dd>1pm $8</dd></dl></td>
       <td>24</td>
        <td>25<dl><dt>Madtown Jugglers</dt><dd>8pm $12/$16/$20</dd></dl></td>
         <td>26</td>
          <td>27</td>
           <td>28<dl><dt>Ralph Williams</dt><dd>8pm $32/$48/$64</dd></dl></td>
            <td>1</td>  
    </tr>
    
    
   
     </tbody>
    
    </div></div></div></div></div></div></div></div></div><!--- closing divs from t,l,r,b,tl,tr,bl,br,box---->
   

</table>
</div>
</body>

</html>



[css] x2
body {font-family: Verdana, Geneva, sans-serif}
#heading {position: absolute; top: 0px; left: 15px; width: 920px;
border-bottom: 1px solid red; }
#leftColumn {position: absolute; top: 170px; left: 15px; width: 280px}
#rightColumn {position: absolute; top: 170px; left: 320px; width: 600px}



#heading ul {list-style-type: none; padding: 0px; margin: 0px;
height: 20px}
#heading ul li {float: left; margin: 0px 3px; width: 100px; height: 20px;
text-align: center; background: url(tab.jpg) no-repeat 100% 0%;}
#heading ul li a {display: block; width: 100px; font-size: 10px;
text-decoration: none; color: black}
#heading ul li a:hover {color: red}



#leftColumn h2 {font-size: 24px; color: red; margin: 0px 0px 10px 0px}
#leftColumn p {font-size: 10px; padding: 0px; margin: 0px 0px 10px 0px}
#leftColumn p i {color: red; font-style: normal}

table.calendar


table.tlCorner {background:topleft.jpg alt:topleft;}
table.trCorner {background:topright.jpg;no-repeat}
table.blCorner {background:bottomleft.jpg;no-repeat}
table.brCorner {background:bottomright.jpg;no-repeat}

table.tBorder {background:top.jpg; repeat:x;position:fixed;top:39px;left:39px}
table.lBorder {background:left.jpg; repeat:y}
table.rBorder {background:right.jpg }
table.bBorder {background:bottom.jpg \}
table.boxContent div {padding:50px}

[/code]
table  {border-spacing: 5px}

table.calendar {font-size:8px}

table.caption {text-align:left;font-size:16px;letter-spacing: 3px}

th {vertical-align:baseline}
dt {vertical-align:middle}



Is This A Good Question/Topic? 0
  • +

Replies To: trying to make a calendar and i am not sure what part of code is wrong

#2 suniahk   User is offline

  • New D.I.C Head

Reputation: 6
  • View blog
  • Posts: 27
  • Joined: 22-May 10

Re: trying to make a calendar and i am not sure what part of code is wrong

Posted 18 November 2010 - 11:34 AM

What specifically is the problem? By the looks of it, your code is a complete mess as far as validation is concerned. If you're just learning HTML, you may have heard about Code Validation. This is a great way to make sure your code is properly formatted to the standard you're trying to use (In this case, I'm assuming XHTML Strict).

First, go Here: http://validator.w3.org/ This is the link to the validator.
You have some options. Either directly upload your code, link to it from a server, or directly copy + paste the code into a textbox. Now, once you tell it to validate, you'll come up with a ton of errors. The first few are complaining that you aren't telling the validator (and, by extension, the browser) what standard you're trying to use. To fix this, replace <html> with

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">



This tells the validator that you want to use the XHTML Strict standard, so now it knows what to compare your code to.

Anyway, as for the rest of the errors, you'll have to figure out what they mean. For example, where it says "Cannot have element <element> here" it means that you're trying to do something that isn't allowed. In the first case, it's because you have a bunch of divs inside a table element. They should be on the outside of the table element, because divs are not a part of the table. From what I can tell, they're supposed to be a border element outside the table.

Hope this helps!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1