Setting Doctype Messes Up Page??

Discussion in 'HTML' started by IWP506@gmail.com, Sep 2, 2005.

  1. Guest

    When I insert the follow doctype at the top of my page

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

    it turns my format into crap.

    Example:

    without: http://img396.imageshack.us/my.php?image=without9da.gif


    with: http://img396.imageshack.us/my.php?image=with4fx.gif

    It's like it adds extra padding to the data in the tables or something.
    I thought validation was supposed to improve your page not ruin it.

    The code for the cell in that screenshot:

    <td width="100%" bgcolor="#8C0000">
    <p align="center"><font color="#FFFFFF" face="Arial"
    size="2"><b>Extras</b></font></td>



    Any ideas?
    , Sep 2, 2005
    #1
    1. Advertising

  2. mbstevens Guest

    wrote:
    > When I insert the follow doctype at the top of my page...
    > it turns my format into crap.


    > I thought validation was supposed to improve your page not ruin it.


    Doctypes specify how things are to be interpreted. A doctype
    will also cause a different interpretation than no doctype.
    Validation only tests whether you are following the rules set
    out by the doctype -- validation cannot change how your page
    is interpreted. You cannot develop a page under no doctype and
    expect it to perform the same way when the browser is told to
    interpret it under a doctype.

    You are still in that shadowland between understanding CSS and
    using deprecated markup.

    Think about your markup here:
    body, p, td {color: #111111;}
    <body bgcolor="#F7F7F7">
    A very odd mixture, no?

    And, I'm sorry, but I find this just bizarre:
    <td width="100%" bgcolor="#8C0000">
    <p align="center"><font color="#FFFFFF" face="Arial"
    size="2"><b>Extras</b></font></td>

    You have closed the <td> before closing the <p> under an XHTML
    doctype. That is just a mistake. Learn how to nest correctly.
    <td>
    <p>
    <font> <!-- CSS would be better better! -->
    Extras
    </font>
    </p>
    </td>

    If you don't pay attention to careful indentation, you will
    always be running into trouble. Any programming-like task
    requires extreme neatness, at least until you're well
    experiencecd. Any time you write a tag, go ahead and write
    its end tag. Then nest other pairs between. Only after all
    that should you insert your text.

    Don't reject CSS and DOCTYPE before you have given it enough
    time to percolate through your brain for a bit longer. Get
    _all_ of the deprecated markup out of your code, move completely
    into CSS, and move the CSS into its own file.
    --
    mbstevens
    http://www.mbstevens.com/cgi/mkatt.pl?name=python/Critique_Generator
    (New version 1.5)
    mbstevens, Sep 2, 2005
    #2
    1. Advertising

  3. mbstevens Guest

    mbstevens wrote:

    > You have closed the <td> before closing the <p> under an XHTML
    > doctype. That is just a mistake.


    Correction -- you are still using HTML 4.01, which will allow
    this. I do suggest moving to the strict version of this doctype.
    mbstevens, Sep 2, 2005
    #3
  4. Guest

    Believe it or not, I didn't write that by hand, it's all FrontPage
    generated, and I haven't even looked at it until right now when I had
    the problem.
    , Sep 2, 2005
    #4
  5. Guest

    My question remains. What can I change about that code to make it
    normal? What is to be interpreted?
    , Sep 2, 2005
    #5
  6. mbstevens Guest

    wrote:
    > Believe it or not, I didn't write that by hand, it's all FrontPage
    > generated, and I haven't even looked at it until right now when I had
    > the problem.
    >

    No wonder! Run, do not walk, to the nearest trash bin and throw
    your CD with FrontPage into it. Modify any good template
    instead. I like the ones at realworldstyle.com.
    mbstevens, Sep 2, 2005
    #6
  7. mbstevens Guest

    wrote:
    > My question remains. What can I change about that code to make it
    > normal? What is to be interpreted?
    >

    There's no cleaning up completely broken markup like that.
    Go for a good template.
    mbstevens, Sep 2, 2005
    #7
  8. Guest

    No wonder! Run, do not walk, to the nearest trash bin and throw
    your CD with FrontPage into it. Modify any good template
    instead. I like the ones at realworldstyle.com.

    lol, I've been thinking about it... I suppose Dreamweaver works
    properly? Looking into getting it.

    Anyway, thanks for your help.
    , Sep 2, 2005
    #8
  9. WD10 Guest

    On Thu, 01 Sep 2005 21:34:54 -0700, IWP506 wrote:

    >
    > No wonder! Run, do not walk, to the nearest trash bin and throw
    > your CD with FrontPage into it. Modify any good template
    > instead. I like the ones at realworldstyle.com.
    >
    > lol, I've been thinking about it... I suppose Dreamweaver works
    > properly? Looking into getting it.


    You can get a free editor for Windows called HTML Kit. It has over 400
    free plugins. http://www.chami.com/htmlkit/

    Also, jEdit.org is a good one, and it's also free.

    HTML Kit might be better because it has a "preview" tab. So you can write
    the HTML and click the "preview" tab and see what page looks like. With
    jEdit, you can preview as you work, but you have to save the document
    (CTRL-S) and then CTRL-TAB to switch to the browser and CTRL-R to reload
    the changes. It takes a tiny bit longer, but isn't any worse.
    WD10, Sep 2, 2005
    #9
  10. mbstevens Guest

    wrote:
    > No wonder! Run, do not walk, to the nearest trash bin and throw
    > your CD with FrontPage into it. Modify any good template
    > instead. I like the ones at realworldstyle.com.
    >
    > lol, I've been thinking about it... I suppose Dreamweaver works
    > properly? Looking into getting it.


    If you really want control of your web world, look into Perl and
    PHP and Python -- look into ways of generating pages through
    databases. WYSIWYG editors will only slow your learning of
    basic (X)HTML, which you will need to know before you can
    generate pages on the fly in response to visitor input.
    mbstevens, Sep 2, 2005
    #10
  11. In article <>,
    wrote:

    > My question remains. What can I change about that code to make it
    > normal? What is to be interpreted?


    I don't know anything about Frontpage markup except what I've read about
    in the group over a significant period of years. Nearly everyone appears
    to think it's absolute junk, but a percentage of people say that you
    just have to know how to use it. I'm not sure if they mean for markup or
    for dealing with your site via FTP. But someone will tell you this part.
    Can you specify a doctype in your program and rearrange the whole thing
    from there?
    How did you learn that there was a doctype? Just curious.

    leo

    --
    <http://web0.greatbasin.net/~leo/
    Leonard Blaisdell, Sep 2, 2005
    #11
  12. Arne Guest

    Once upon a time ** wrote:

    > My question remains. What can I change about that code to make it
    > normal? What is to be interpreted?
    >


    You will be ignored if you top post, don't quote what
    you are replying to and cut of only the signatures!

    http://www.safalra.com/special/googlegroupsreply/

    --
    /Arne
    Arne, Sep 2, 2005
    #12
    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. Kenneth Keeley

    Setting DocType in Asp.Net

    Kenneth Keeley, Jun 29, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    613
    Cowboy \(Gregory A. Beamer\) [MVP]
    Jun 30, 2004
  2. Michael Preminger

    Setting DOCTYPE to a DOM- document

    Michael Preminger, Dec 20, 2004, in forum: Java
    Replies:
    5
    Views:
    11,946
    John C. Bollinger
    Dec 22, 2004
  3. sck10
    Replies:
    10
    Views:
    1,961
    demmith
    Mar 31, 2008
  4. Binba
    Replies:
    1
    Views:
    409
  5. Larry Lindstrom
    Replies:
    19
    Views:
    1,284
    Jonathan N. Little
    Jun 12, 2012
Loading...

Share This Page