Web Analytics Made Easy -
StatCounter what shall i do - CodingForum

Announcement

Collapse
No announcement yet.

what shall i do

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

  • what shall i do

    my html use
    Code:
    <!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">
    however to my amaze,when i checked using http://validator.w3.org, <td> tag in this kind of doctype cannot use "width,height and background" etc,
    i already tried my best to use lesser table, td tags, however this td tag is important as it define the main framework of my webpage, it defines three main column, i could mess it up if i use div as i only know how to use dive create two columns, anybody can help? or any suggestion?
    flying dagger

  • #2
    You'll need to move those parts of your xhtml towards the CSS equivalents. For example instead of
    Code:
    <td width="500" height="500" background="blue.jpg">&nbsp;</td>
    it would be
    Code:
    <td style="width:500px;height:500px;background-image:url(blue.jpg)">&nbsp;</td>
    or you can assign an ID or a class to the td cell
    Code:
    <td id="blah">&nbsp;</td>
    Code:
    <td class="blah">&nbsp;</td>
    Code:
    <style type="text/css">
    #blah {
    width:500px;
    height:500px;
    background:url(blue.jpg);
    }
    .blah {
    width:600px;
    height:300px;
    background:url(blue.jpg);
    }
    </style>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

    Comment


    • #3
      thankyou
      flying dagger

      Comment


      • #4
        there is another problem i have
        [code]
        onClick="expandcontent('sc3')"
        [code]

        i put it in span, div, <a> allcannot work, how to do now?
        flying dagger

        Comment


        • #5
          <td width="500" height="500" background="blue.jpg">&nbsp;</td>

          Comment


          • #6
            hi, it is not valid, by the way, anybody know how to replace <div align="center"> to something that align image to center?
            flying dagger

            Comment


            • #7
              The onClick needs to be lowercase. My suggestion to you is find a different doctype as you seem to have no idea what XHTML is. HTML Strict might be better for you. To align the image to the center you use text-align:center; again all of this can be learned if you just even looked at what CSS even was. If you knew CSS you could get rid of ALL of your tables. Even with just a little CSS knowledge these questions wouldn't need to be asked. www.htmldog.com is a good place to start.
              ||||If you are getting paid to do a job, don't ask for help on it!||||

              Comment


              • #8
                million of thanks
                flying dagger

                Comment

                Working...
                X