Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: what shall i do

  1. #1
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 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
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||

  • #3
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 Posts
    thankyou
    flying dagger

  • #4
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 Posts
    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

  • #5
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <td width="500" height="500" background="blue.jpg">&nbsp;</td>

  • #6
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 Posts
    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

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||

  • #8
    Regular Coder
    Join Date
    Sep 2004
    Posts
    713
    Thanks
    6
    Thanked 2 Times in 2 Posts
    million of thanks
    flying dagger


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •