View Full Version : what shall i do

09-29-2006, 05:21 AM
my html use

<!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?

09-29-2006, 05:32 AM
You'll need to move those parts of your xhtml towards the CSS equivalents. For example instead of

<td width="500" height="500" background="blue.jpg">&nbsp;</td>
it would be

<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

<td id="blah">&nbsp;</td>

<td class="blah">&nbsp;</td>

<style type="text/css">
#blah {
.blah {

09-29-2006, 06:06 AM

09-29-2006, 06:41 AM
there is another problem i have

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

09-29-2006, 07:10 AM
<td width="500" height="500" background="blue.jpg">&nbsp;</td>

09-29-2006, 07:49 AM
hi, it is not valid, by the way, anybody know how to replace <div align="center"> to something that align image to center?

09-29-2006, 08:03 AM
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.

09-29-2006, 08:17 AM
million of thanks

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum