need refresher course to figure out what I'm doing wrong

R

richard

A simple case of having been out of the scene for so long I suppose.

What I can't understand is why firefox refuses to render the page correctly
as IE does and the editor (acehtml).

Just a simple layout. But firefox refuses to show the division under the
"top", that is "menu", and FF does not show the proper size of "top".

So enlighten me and help me get back on track of doing this right.



Thanks.





<?xml version="1.0" encoding="windows-1252"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Created on: 9/16/2006 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title></title>

<style type="text/css">

#container

#top
{ width="100%"; height="140px";
background: #E69712 url('worldmap4b.png') no-repeat center;
z-index:-1;
font:arial, helvetica;
font-size:24pt;
text-align:center;
}


#left
{width="200px"; height="1000px"; background-color="#aabbcc"; float="left";

}
</style>
</head>
<body>

<div id="container">
<div id="top">

1 small world
</div>
<div id="left">
Menu
</div>
Body Content
</div>


</body>
</html>
 
A

Andy Dingley

richard said:
What I can't understand is why firefox refuses to render the page correctly
as IE does and the editor (acehtml).

I haven't even looked at your page, but dollars to doughnuts FF is
right, IE is wrong, and the code isn't valid.
So enlighten me and help me get back on track of doing this right.

Enlighten us first - tell us the URL. Fragments don't cut it because
for any non-trivial error, we need to see what the server is saying
too.

<?xml version="1.0" encoding="windows-1252"?>

Don't use an XML prolog on web content

Don't use a Windows codepage on web content
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Don't use XHTML unless you know what you're doing and why.

Don't use XHTML 1.1

Don't even think about writing XHTML without validating it.

If you insist on using XHTML, do it right.

<style type="text/css">

#container

#top
{

This is probably a typo for "#top" when what you've actually coded as a
selector is "#container #top" However it shouldn't actually hurt in
this case, and may even be intended.
width="100%"; height="140px";

Don't quote property values in CSS, I haven't tested this, but I
imagine Firefox is correctly rejecting this incorrect code, whilst IE
is attempting to auto-fix it up. I suspect this is the problem that's
actually causing trouble.

For all the rest, search the ng archives.
 
F

freemont

A simple case of having been out of the scene for so long I suppose.

What I can't understand is why firefox refuses to render the page
correctly as IE does and the editor (acehtml).

Just a simple layout. But firefox refuses to show the division under the
"top", that is "menu", and FF does not show the proper size of "top".

So enlighten me and help me get back on track of doing this right.

Corrected a bunch of typos in CSS:

<style type="text/css">

#container {
}
#top {
width:100%;
height:140px;
background: #E69712 url('worldmap4b.png') no-repeat center; z-index:-1;
font:arial, helvetica;
font-size:24pt;
text-align:center;
}
#left {
width:200px;
height:1000px;
background-color:#aabbcc;
float:left;
}

</style>

Shooting the file up to a validator would have found all this in the first
place. ;-)
 
T

Thomas Jollans

[snip]
<?xml version="1.0" encoding="windows-1252"?>

Don't use an XML prolog on web content
Why not ? It's completely correct - the only problem is that it throws
IE6 (and others?) into some quirks mode that creates problems.
Don't use a Windows codepage on web content
...., use UTF-8 or an ISO-8859 encoding like iso-8859-1 (latin1) or
iso-8859-15 (latin9: variation of latin1, with EUR symbol).
Don't use XHTML unless you know what you're doing and why.

XHTML is a lot more consistent than HTML<=4, making it easier to
support and possibly tags easier to recognise.
Don't use XHTML 1.1

Why not ? It's the most current W3c recommendation. There's not much
(if any ) benefit over XHTML 1.0 Strict to the web site author though.
Don't even think about writing XHTML without validating it.

validating is always good, but writing valid XHTML isn't harder than
HTML 4. You just need to know XML syntax, which is really not that hard.
If you insist on using XHTML, do it right.

does this have anything to do with the "<head>" ?


To the original poster: make sure the code is valid, and give us a URL.
Don't trust IE, it has many bugs. I recommend writing with a almost
standards compliant (Opera, Konqueror, Safari, other KHTML) or
fairly standards compliant (Firefox, Seamonkey, KMeleon, other Gecko)
browser and and then tune around the bugs of IE. I wouldn't be
surprised if your web editor used the IE rendering engine internally,
so don't be surprised that it displays "just as correctly" as IE.

Thomas Jollans
 
A

Andy Dingley

Thomas said:
On 18 Sep 2006 03:43:43 -0700

Why not ? It's completely correct - the only problem is that it throws
IE6 (and others?) into some quirks mode that creates problems.

Several browsers will fail to render the page at all.

The web, as it currently stands, is _not_ ready for XHTML except under
Appendix C. It just plain doesn't work right, unless you faff around
presenting it as text/html instead. And that's the _optimistic_,
pro-XHTML view of things! Many people still reckon that all XHTML is
_entirely_ inappropriate, and there's very few that have any tangible
benefit to using it. As for trying to make it fly in a purely XML
context, then that's simply unaceptable, this year, as the sole format
of content served.

As the OP is having trouble with basic CSS syntax, then it's most
unlikely he has anything to gain from XHTML, and certainly not from the
extremely narrow tightrope to walk that is using XHTML as XML.


does this have anything to do with the "<head>" ?

To the original poster:

How about actually fixing the obvious bug he has the problem with?
 
J

Jonathan N. Little

richard said:
... I wasn't seeing it.

Neither am I! USENET TIP: Please quote relevant parts of the previous
message to which you are responding to.
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top