Forum Moderators: open

Message Too Old, No Replies

XHTML, HTML and CSS problem

Converting site to XHTML and I have this prob.

         

Ashton

6:29 pm on May 23, 2003 (gmt 0)

10+ Year Member



This problem will only be visible on Internet Explorer. Note that there is no frameset being used.
I have 2 pages that are identical (except for the "DOCTYPE" header on the XHTML one) located here:

<snip>
<snip>

My problem is that that the CSS "position: relative" value in div.opaque{} operates differently in HTML(correct) and XHTML(incorrect). In the XHTML it doesn't print the text within the box.

If there is no way around this, is there another way to do what I am wanting to do? (ie. making the table cell background transparent, while have the text within it opaque?)

[edited by: korkus2000 at 6:32 pm (utc) on May 23, 2003]
[edit reason] no specifics please [/edit]

universalis

6:45 pm on May 23, 2003 (gmt 0)

10+ Year Member



My problem is that that the CSS "position: relative" value in div.opaque{} operates differently in HTML(correct) and XHTML(incorrect).

I suspect that the problem is that using the XHTML doctype is forcing the browser into standards-compliance mode, whereas your original HTML was using an incomplete HTML doctype, meaning the browser was in quirks mode. This affects a large number of things related to the box model, padding, margins, etc. Sorry I can't give a clearer answer as I haven't seen your code. Note that the XHTML page is not "incorrect", it is that the browser parses it differently (as it would with certain HTML4 doctypes).

Ashton

7:06 pm on May 23, 2003 (gmt 0)

10+ Year Member



Thanks for the reply. It looks like you were right.... I added an "HTML 4 strict" DOCTYPE header and it did the same thing as the XHTML =/

I guess it's back to the drawing board... stoopid non-scrolling relative positioning! ;)