SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Hybrid View

  1. #1
    SitePoint Zealot lord's Avatar
    Join Date
    Nov 2003
    Location
    sLOVEnia
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    from html 4.01-> xhtml 1.0 problems

    Heya folks

    Well I started to learn xhtml. In the past I use to write my code in html 4.01 standard, and now I think it's a time to go one step forward. And that is xhtml.

    For the base I take my old html and do some corections and I manage to do validate xhtml page.

    But I have now some questions. First i want do transform my old page to xhtml strict doctype, but there is a problem.
    I have in my page form like this:
    <form action="server" method="post" name="VNOS" onsubmit="submitonce(true)">
    So if I use strict mode, than my page is not xhtml validate, beacause acording to w3c /name="VNOS"/ is not an option. It is suported only for
    T=Transitional, and F=Frameset.
    http://www.w3schools.com/tags/tag_form.asp
    name / form_name / Defines a unique name for the form / TF

    Is there any other way to name my form?

    p.s. Also inbox defined with CSS looks diferent. If I use strict mode, then the height of inbox is corect, but in transitional mode is about 1/3 size biger. Anybody know why?

    p.s.s. I use IE6

    Thanx in advance for your help

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    use id instead of name

    inbox looks different? got url?
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    SitePoint Zealot lord's Avatar
    Join Date
    Nov 2003
    Location
    sLOVEnia
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    heya

    will try with id.

    And about inbox. Here is the code I use :

    "xhtml"
    <table width="100%" class='table' cellspacing="0" cellpadding="0">
    <tr>
    <td width="50%" class="tdm_r">Datum valute/td>
    <td width="50%" class="tdm_l"><input type="text" class="inbox" name="D1" size="10" maxlength="10" /></td>
    </tr>
    </table>

    "CSS"
    .inbox {
    margin: 0px 0px 0px 2px;
    font-size: 13px;
    height: 20px;
    padding-top: 3px;
    }

    input.inbox {
    font: 13px;
    border: 1px solid #000;
    background-color: #F6F7F5;
    }

    thanx for help

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    sorry, i do not see any difference in the input box whatsoever

    http://r937.com/testformTRANS.htm

    http://r937.com/testformSTRICT.htm

    if you validate the pages, you will notice that in STRICT, "name" is not valid for FORM, and "width" is not valid for TABLE

    but the input boxes are identical

    rudy

  5. #5
    SitePoint Zealot lord's Avatar
    Join Date
    Nov 2003
    Location
    sLOVEnia
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937
    sorry, i do not see any difference in the input box whatsoever

    http://r937.com/testformTRANS.htm

    http://r937.com/testformSTRICT.htm

    if you validate the pages, you will notice that in STRICT, "name" is not valid for FORM, and "width" is not valid for TABLE

    but the input boxes are identical

    rudy
    Heya Rudy

    I change my form name to id.
    Still must delete width parameter.

    About the inbox-es. In strict mode looks like yours, and in transitional mode they are cca 3 mm smaler. Well I don't have a clue why they are smaller in trans. mode. Let's say it's ok now.


    I have also some troubles with fonts. They are too small.
    Could you please try this on above links


    "html"
    <p id="naslov">naslov</p>

    "CSS"
    #naslov {
    font: normal large;
    color: #0000BF;
    text-align: center;
    }

    thanx
    Marko

  6. #6
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    okay, done

    http://r937.com/testformTRANS.htm

    http://r937.com/testformSTRICT.htm

    if the large font size is "too small" then try setting it in percentage, you will likely have better luck than using keywords (i cannot remember which browsers fully support them)


    you really should test this stuff for yourself, my friend

    i'm gonna go watch football now

  7. #7
    SitePoint Zealot lord's Avatar
    Join Date
    Nov 2003
    Location
    sLOVEnia
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by r937
    okay, done

    http://r937.com/testformTRANS.htm

    http://r937.com/testformSTRICT.htm

    if the large font size is "too small" then try setting it in percentage, you will likely have better luck than using keywords (i cannot remember which browsers fully support them)


    you really should test this stuff for yourself, my friend

    i'm gonna go watch football now
    thanx Rudy, well as I asumed, font size at your page (strict&trans.) looks like mine. But before in html 4.01 they were 3x biger than now.
    Also try with % but no luck ...

    Well I will do some testing and try to figure out why is this happen.

    by

  8. #8
    SitePoint Zealot lord's Avatar
    Join Date
    Nov 2003
    Location
    sLOVEnia
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is another problem ... could you tell me if this is right way to do it.

    I want to validate my page to xhtml 1.0 strict

    Well I use in my html:
    <input type="hidden" name="S" value="1" />

    this is not ok, so I get error if I make validation:

    Line 28, column 53: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
    <input type="hidden" name="S" value="1" />

    Then I try this one:
    <fieldset><input type="hidden" name="SLIKA" value="1" /></fieldset>

    - I get no error, but is right way to use? Or should I do something else.

    thanx

  9. #9
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,015
    Mentioned
    53 Post(s)
    Tagged
    2 Thread(s)
    the INPUT needs to be inside a container

    i use P, but many people use DIV
    r937.com | rudy.ca | Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  10. #10
    SitePoint Zealot lord's Avatar
    Join Date
    Nov 2003
    Location
    sLOVEnia
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I could use also a table ..

    well fieldset is also validating ok (xhtm 1.0 strict) ... so this is not wrong use. Or it is?

    Maybe I will try with div and css - display: none;


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •