|
Posted by David Ross on May 15, 2005, 11:27 am
Please log in for more thread options
Steve wrote:
>
> Hi,
>
> [1]
>
> I have the below line in every page of a site, to set up the top section of
> the page:
>
> <table width="100%" cellspacing="0" cellpadding="0"
> background="images/index_topstrip.gif">
>
> The HTML validator is failing the part:
>
> background="images/index_topstrip.gif"
>
> The statement clearly works or my site wouldn't look the way it does.
>
> Can anyone tell me how to alter the code to pass validation, r an
> alternative way to do this?
>
> (It is tiling a small verticle image across the top of the page in a table.
> I'm using the table to stop it tiling all the way down the page.)
>
> [2]
> I also set up some text 'buttons' in a table on each page like this:
>
> <table width="135" border="1" cellspacing="0" cellpadding="3">
> <tr>
> <td align="center" valign="middle" bordercolor="#0033CC"
> bgcolor="#84D6F7" class="style3"><a href="index.html">Home</a></td>
> </tr>
>
> The validator is failing this bit:
> bordercolor="#0033CC"
>
> again which works fine.
> Is there a way I can do something else to keep the effect but validate.
>
> The site is using a stylesheet, so if I can do both in a stylesheet, that
> would be cool.
>
> thanks
Don't use a table for this. Use a style-sheet to create a box at
the top of the page, a box that has your background image.
Just because some browsers make sense of invalid HTML does not make
the HTML valid. Other browsers might not be so loose.
--
David E. Ross
<URL:http://www.rossde.com/>
I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.
|