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

Discussion in 'HTML' started by richard, Sep 18, 2006.

  1. richard

    richard Guest

    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>
    richard, Sep 18, 2006
    #1
    1. Advertising

  2. richard

    Andy Dingley Guest

    richard wrote:

    > 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.

    > <head>


    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.
    Andy Dingley, Sep 18, 2006
    #2
    1. Advertising

  3. richard

    freemont Guest

    On Mon, 18 Sep 2006 03:17:42 -0600, richard wrote:

    > 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. ;-)

    --
    "Because all you of Earth are idiots!"
    ¯`·.¸¸.·´¯`·-> freemont© <-·´¯`·.¸¸.·´¯
    freemont, Sep 18, 2006
    #3
  4. On 18 Sep 2006 03:43:43 -0700
    "Andy Dingley" <> wrote:

    >
    > [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.

    > > <head>

    >
    > 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
    Thomas Jollans, Sep 18, 2006
    #4
  5. richard

    Andy Dingley Guest

    Thomas Jollans wrote:

    > On 18 Sep 2006 03:43:43 -0700
    > "Andy Dingley" <> wrote:


    > > 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.


    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.



    > > > <head>

    > >
    > > If you insist on using XHTML, do it right.

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


    Sorry, poor trimming on my part. Look at what's missing from <html>


    > To the original poster:


    How about actually fixing the obvious bug he has the problem with?
    Andy Dingley, Sep 18, 2006
    #5
  6. richard

    richard Guest

    Thanks. That's kind of what I figured but I wasn't seeing it.
    richard, Sep 18, 2006
    #6
  7. richard wrote:
    > ... I wasn't seeing it.
    >


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

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Sep 18, 2006
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wayne  Wengert

    Can't Figure Out What is Wrong

    Wayne Wengert, Feb 27, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    434
    Michael H
    Feb 28, 2005
  2. capes
    Replies:
    0
    Views:
    374
    capes
    Sep 9, 2005
  3. Good refresher site

    , Mar 12, 2007, in forum: C Programming
    Replies:
    11
    Views:
    512
    Keith Thompson
    Mar 13, 2007
  4. Niall 84

    Refresher questions in C/C++

    Niall 84, Oct 29, 2008, in forum: C Programming
    Replies:
    3
    Views:
    311
    Default User
    Oct 29, 2008
  5. getline - refresher

    , Apr 9, 2009, in forum: C++
    Replies:
    2
    Views:
    256
    Jerry Coffin
    Apr 9, 2009
Loading...

Share This Page