Forum Moderators: open

Message Too Old, No Replies

From XHTML1.0 Strict->Transitional

My divs are not in the same place anymore

         

beata

2:31 pm on Jul 5, 2003 (gmt 0)

10+ Year Member



I did a site using XHTML 1.0 Strict then I added some target=_blank to some external links and now it will not validate anymore so I need to change to Transitional instead.

If I change to Transitional my div that holds my columns change to be smaller then it was before and I tried to adjust its with value and then it looked fine in IE 6 but not in NN7 (I have some other problems with NN as well but That has to be another post :-).

[edited by: Marcia at 11:59 pm (utc) on July 5, 2003]
[edit reason] No individual sites, please. [/edit]

DrDoc

9:33 pm on Jul 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World! :)

Please review the Terms of Service [webmasterworld.com].

If the only thing you add is the target attribute, then there is surely something else that is wrong.

Are you using a full doctype declaration? Are you using the XML prologue?

beata

10:30 pm on Jul 5, 2003 (gmt 0)

10+ Year Member



I just opened up the web browser for sufing to this forum to write that I found the problem. DW add a row before doctype. So now that problem is out of the way and I have changed to transitional. The problem was never teh targets, they was just the reason why I had to change from strict to transitional.

But now I have ended up with another problem. I thought that I had a very good solution for accessability with the following code:

<script type="text/javascript">document.write
("<a href=\"javascript:\" onclick=\"window.open('../../popup/attaknop.html','','scrollbars=yes,
resizable=yes,width=300,height=550');\">Open up a popup with info</a>");</script>
<noscript>
<a href="../../popup/attaknop.html" target="_blank">
script not available, use an ordinary window</a>
</noscript>

But it failed the validation :-(

Line 189, column 90: an attribute value must be a literal unless it contains only name characters
(explain...).
.../javascript">document.write("<a href=\"javascript:\" onclick=\"window.open('.

Line 189, column 114: an attribute value must be a
literal unless it contains only name characters (explain...).
...ite("<a href=\"javascript:\" onclick=\"window.open('../../popup/rabandsknop.h

Line 189, column 215: document type does not allow element "a" here (explain...).
...sizable=yes,width=300,height=550');\">
r&aring;bandsknop</a>");</script>

So now I have to choose, validate that page XHTML
or go for a better acessability.

If no one here knows a better solution, sometimes my
middle of the night solutions are quite bad :-) Maybe I just escaped the characters in the wrong way or something like that?

Ps. Thank you for welcoming me, I hav been a reader of teh forum for quite a while know and I think there is a lot of knowledge among the users. Hopefully I will be able to contribute as an answerer as well.

[edited by: Marcia at 12:04 am (utc) on July 6, 2003]
[edit reason] Line breaks for side scrolling. [/edit]

DrDoc

10:38 pm on Jul 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The problem most likely lies a row or two before the script lines.

beata

11:41 pm on Jul 5, 2003 (gmt 0)

10+ Year Member



I solved it by putting the script in an external .js file instead.

But I still have problems with my <noscript> (they are not allowed within a <p></p> and I do not want a paragraph break i nteh middle of my sentence) but I think I need to move that question somewhere then the CSS forum :-)

tedster

5:08 am on Jul 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've usually been able to resolve formatting issues like that by having the document.write() take care of a bit more of the document -- back it up to include everything from the beginning of the <p> or <div>.

The <noscript> tags may then end up duplicating some of the material, but the page ends up looking the way you want.

beata

8:58 am on Jul 6, 2003 (gmt 0)

10+ Year Member



I guess that is what I have to do.

killroy

9:41 am on Jul 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like a wrogn tool for the wrong job. Have you read the articls on the myth of html compatibility of xhtml? Are you serving your xhtml as text/xml? What accesibility advantages do you think you are gaining?

Just a hint to perhaps do a bit more research before you jump on a bandwagon.

SN

beata

10:06 am on Jul 6, 2003 (gmt 0)

10+ Year Member



Can you point me in the right direction for the articles you are refering to?

If the user has javascript turned off I still want them to be able to receive the instructions that is in the popup window but as an ordinary extra window instead (if they are using a window based browser).

killroy

10:17 am on Jul 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



found it!

[hixie.ch...]

Title: Sending XHTML as text/html Considered Harmful

Enjoy :) Sure was an eye opener to me and made me remove my xhtml, and downgraded an netire site to html 4.01 and revalidate all the pages.

SN

g1smd

10:57 am on Jul 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've never found a need to progress beyond HTMl 4.01 Transitional either.

beata

11:06 am on Jul 6, 2003 (gmt 0)

10+ Year Member



Hi!

Thank you, i'll read it later today.