Pls help me to validate some code!

Pls help me to validate some code!

am 06.08.2007 13:32:56 von jollyroger

I have a table that will only validate if I use inline or an attached
style. I would love to do that but for some really strange reason if I
use the same identical attributes in my style it hoses up my layout??
Can I please have a fresh eye look at this and tell me if it's
something obvious I'm missing? Thanks!
(I commented out the inline style for the table)

www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



Untitled Document



bgcolor="#FAF9F7">











bgcolor="#000066"> td>
td>
bgcolor="#535563">










bgcolor="#535563"> border="1" /> bgcolor="#535563"> border="1" /> bgcolor="#535563"> border="1" />
bgcolor="#535563"> cellpadding="0" cellspacing="0">




class="sometext">Box One
width="243" height="25" border="0" cellpadding="0" cellspacing="0">
class="sometext">Box Two
width="243" height="25" border="0" cellpadding="0" cellspacing="0">
class="sometext">Box Three






Re: Pls help me to validate some code!

am 06.08.2007 14:04:21 von a.nony.mous

jollyroger wrote:

> I have a table that will only validate if I use inline or an attached
> style. I would love to do that but for some really strange reason if
> I use the same identical attributes in my style it hoses up my
> layout??

First, I suggest you give the URL to your page, instead of posting code
fragments here.

> Can I please have a fresh eye look at this and tell me if it's
> something obvious I'm missing? Thanks!

Let us know when it's on a web server. Your mix of CSS and old-style
inline styling is .. well .. old.

> (I commented out the inline style for the table)

With the "" ? HTML comment markers don't work in CSS and
should be removed.

> > www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

New pages should be Strict; you aren't Transitioning from anything.

>
>
>
>

> bgcolor="#FAF9F7">
>
>
>
>
>
>
>
>
>
>
>
>
> bgcolor="#000066"> > td>
>
> td>
>
> bgcolor="#535563">
>
>
>
>
>
>
>
>
>
>
>
> bgcolor="#535563"> > border="1" /> > bgcolor="#535563"> > border="1" /> > bgcolor="#535563"> > border="1" />
> bgcolor="#535563"> > cellpadding="0" cellspacing="0">
>
>
>
>
>
> class="sometext">Box One
> width="243" height="25" border="0" cellpadding="0" cellspacing="0">
>
> class="sometext">Box Two
> width="243" height="25" border="0" cellpadding="0" cellspacing="0">
>
> class="sometext">Box Three

>
>
>
>
>
>

That markup sucks.

Anyway, when you use css, you need to include units. It's also probably
a bad idea to mix css and archaic html styling.

--
Neredbojias
Half lies are worth twice as much as whole lies.

Re: Pls help me to validate some code!

am 06.08.2007 14:34:45 von Andy Dingley

On 6 Aug, 12:32, jollyroger wrote:

> I have a table that will only validate if I use inline or an attached
> style.

You have a mixture of HTML 3.2 code (

and presentational
attributes) and XHTML. Please replace this pointless craziness with
something sensible first. It's pointless to put work into a micture
like this.

* Use HTML 4.01 Strict rather than XHTML - XHTML is of no help to you
and it's one more thing to confuse you.

* Use HTML 4.01 Strict and CSS rather than HTML 3.2 markup with
presentational attributes. It's hard work and pointless to try
debugging the mixture of both.

* Lose the
, if you possibly can. Legacy issues and available
time might make this impractical.

* Use CSS in a stylesheet (internal or external) if possible, or
inline style elements if you absolutely must.

* Validate your HTML and CSS to catch the trivial syntax errors

* Post a URL to a working example, not a code fragment

Re: Pls help me to validate some code!

am 06.08.2007 15:32:52 von Andy Dingley

On 6 Aug, 13:04, "Beauregard T. Shagnasty"
wrote:

> With the "" ? HTML comment markers don't work in CSS and
> should be removed.

Although they _do_ work in XML, and so also in real XHTML. This code
thus has a huge difference in behaviour depending on whether the
"labelled as XHTML" content gets treated _as_ real XHTML, or merely
(and most likely) as plain old HTML.

Using comments like this is thus a terrible idea.