XHTML positioning issue

J

Jay

Hello all!

I'm in the process of converting my web pages to XHTML 1.0 transitional but
I'm having a problem with the content positioning of my page. An example can
be seen at http://www.taalliance.org/zzzzzz.htm.

The text that shows in the upper-left corner should be in the white area to
the right of the navigation bar. In the Doctype, if I change it from XHTML
1.0 to HTML 4.01, it shows up just fine.

I'm sure it's just something that I did wrong but I can seem to figure it
out.

I tried taking the heading out of the div tag and it still shows up the
same.

Any suggestions?

Thanks,

- J
 
M

Matthias Gutfeldt

Jay said:
http://www.taalliance.org/zzzzzz.htm.

The text that shows in the upper-left corner should be in the white area to
the right of the navigation bar. In the Doctype, if I change it from XHTML
1.0 to HTML 4.01, it shows up just fine.


I haven't looked at it in detail, but your stylesheet has errors: You
forgot to add units in the .main class. Instead of top:156 it should
probably be top:156px and so on. Some browsers "correct" this for you
when they're in quirks mode, that's probably why changing the Doctype
also "corrected" the problem you were seeing.

So fix the stylesheet and see if that solves the problem. You might also
want to use one of the XHTML Doctype Declarations from the XHTML1.0
Specification: <http://www.w3.org/TR/xhtml1/#strict>


Matthias
 
J

Jay

Matthias Gutfeldt said:
I haven't looked at it in detail, but your stylesheet has errors: You
forgot to add units in the .main class. Instead of top:156 it should
probably be top:156px and so on. Some browsers "correct" this for you
when they're in quirks mode, that's probably why changing the Doctype
also "corrected" the problem you were seeing.

I can't believe I missed that. Problem solved!

Thanks Matthias,

- J
 
B

Beauregard T. Shagnasty

Jay pounced upon this pigeonhole and pronounced:
Hello all!

I'm in the process of converting my web pages to XHTML 1.0 transitional but
I'm having a problem with the content positioning of my page. An example can
be seen at http://www.taalliance.org/zzzzzz.htm.

The text that shows in the upper-left corner should be in the white area to
the right of the navigation bar. In the Doctype, if I change it from XHTML
1.0 to HTML 4.01, it shows up just fine.

Have you looked at the page with a Gecko browser, or Opera? I used
Firebird and Opera7, and the white space where it says "Hello" is canvas-
height high, covering your links.

Maybe this will help:
http://www.w3.org/QA/2002/04/valid-dtd-list.html
and
http://validator.w3.org/check?uri=http://www.taalliance.org%
2Fzzzzzz.htm
 
B

Beauregard T. Shagnasty

Jay pounced upon this pigeonhole and pronounced:
I can't believe I missed that. Problem solved!

Almost. <g> You must have changed that seconds after I viewed the page.

Methinks you still need to visit the validator.

<html lang="english"> should be <html lang="en">

Move your <body style.. to the stylesheet.
The image <img src="images/AllianceMastheadArcs.gif" .. seems to be
floating between divs. Is there no banner div?
 
J

Jay

Beauregard T. Shagnasty said:
Jay pounced upon this pigeonhole and pronounced:

Almost. <g> You must have changed that seconds after I viewed the page.

Methinks you still need to visit the validator.

I keep getting this weird error: Line 1, column 120: DTD did not contain
element declaration for document type name

http://validator.w3.org/check?uri=http://www.taalliance.org/zzzzzz.htm
Move your <body style.. to the stylesheet.

I kept running into problems when I tried to do this in the past but I found
out why. I wasn't setting the path correctly.
The image <img src="images/AllianceMastheadArcs.gif" .. seems to be
floating between divs. Is there no banner div?

No banner div. I set up a class in the style sheet to position the image at
the top.
 
B

Beauregard T. Shagnasty

Jay pounced upon this pigeonhole and pronounced:
I keep getting this weird error: Line 1, column 120: DTD did not contain
element declaration for document type name

http://validator.w3.org/check?uri=http://www.taalliance.org/zzzzzz.htm

Your doctype looks correct, except it's on one line. I don't know for sure
if it makes any difference, but this is what the W3C page gives as your
valid doctype, on two lines:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

My sites are XHTML 1.0 Strict, and I pasted from the W3C page to my
template, and it validates.
I kept running into problems when I tried to do this in the past but I found
out why. I wasn't setting the path correctly.

<g> Depending on the server (*nix?) you may be faced with exact case of
your filenames. I'd recommend using all lowercase filenames all the time.
Much less confusing.
No banner div. I set up a class in the style sheet to position the image at
the top.

Ah, I see. Personally, I'd put the image in a <div id="header"> and
position the div. Then, your <img is not floundering loose in the body.
IIRC, inline items are supposed to be contained in block items, other than
body. I read that somewhere...
 
D

DU

Beauregard said:
Jay pounced upon this pigeonhole and pronounced:



Your doctype looks correct, except it's on one line.

Not relevant.

I don't know for sure
if it makes any difference, but this is what the W3C page gives as your
valid doctype, on two lines:

1 or 2 line; does not matter really.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The document top-element (document's root element) must be lowercase
because elements are lowercase in XHTML.

<!DOCTYPE TopElement Availability "Registration//Organization//Type
Label//Definition Language" "URL">
My sites are XHTML 1.0 Strict, and I pasted from the W3C page to my
template, and it validates.




<g> Depending on the server (*nix?) you may be faced with exact case of
your filenames. I'd recommend using all lowercase filenames all the time.
Much less confusing.




Ah, I see. Personally, I'd put the image in a <div id="header"> and
position the div. Then, your <img is not floundering loose in the body.
IIRC, inline items are supposed to be contained in block items, other than
body. I read that somewhere...

DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
 
B

Beauregard T. Shagnasty

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top