martin: MSIE: bestimmte tags im div formatieren

hallo,

ich habe ein formular in einem div verpackt, und möchte den abstand des formulars nach oben/unten zu den anderen elementen davor/danach verringern. dazu formatiere ich mein form-tag mit display:inline.

im html sieht das einfach so aus:
<div id="submenue">
<form ....>...</form>
</div>

das entsprechende css dazu:
#submenue form {
display:inline;
}

damit sollten ja eigentlich alle form-elemente innerhalt von #submenue mit display:inline  formatiert werden.
Klappt auch. aber nur im Moz/FF...
IE ignoriert das einfach...

Gibts eine Möglichkeit (von Inline-CSS, eigener Klasse etc. mal abgesehen) dem IE möglichst knapp zu sagen, das er das form-tag mit display:inline formatieren soll?

vielen dank für eure hilfe,
grüße,
martin

  1. martin,

    ich habe ein formular in einem div verpackt,

    Wozu? (form ist ein Blockelement.)

    und möchte den abstand des formulars nach oben/unten zu den anderen elementen davor/danach verringern. dazu formatiere ich mein form-tag mit display:inline.

    Wozu?

    Warum gibst du nicht dem form-Element die entsprechenden Abstände?
    Gunnar

    --
    I never intended HTML source code (the stuff with the angle brackets) to be seen by users. […] To my surprise, people quickly became familiar with the tags and started writing their own HTML documents directly. (Tim Berners-Lee in Weaving the Web)
    1. Hallo Gunnar.

      ich habe ein formular in einem div verpackt,

      Wozu? (form ist ein Blockelement.)

      Da fällt mir wieder ein, dass es bei XHMTL 1.0 Strict umgekehr _zwingend_ erforderlich ist.

      Ich verstehe bis heute nicht, warum...

      Gruß, Ashura

      --
      Selfcode: sh:( fo:) ch:? rl:( br:^ n4:& ie:{ mo:) va:) de:> zu:) fl:( ss:| ls:[ js:|
      Try it: Become an Opera Lover in 30 days
      1. Ashura,

        Da fällt mir wieder ein, dass es bei XHMTL 1.0 Strict umgekehr _zwingend_ erforderlich ist.

        Wie kommste denn darauf?

        http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd:
        <!ENTITY % Block "(%block; | form | %misc;)*">

        Und das ist valides XHMTL 1.0 Strict:

          
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="">  
         <head>  
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />  
          <title>Test</title>  
         </head>  
          
         <body>  
          <form action="http://example.net"></form>  
         </body>  
        </html>  
        
        

        Gunnar

        --
        I never intended HTML source code (the stuff with the angle brackets) to be seen by users. […] To my surprise, people quickly became familiar with the tags and started writing their own HTML documents directly. (Tim Berners-Lee in Weaving the Web)
        1. Hallo,

          Wie kommste denn darauf?

          Wie kommst du darauf, dass er form meint? ;)
          Er meinte natürlich input

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
          <html>
          <head>
            <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
            <title>Test</title>
          </head>

          <body>
            <form action="http://example.net"><input type="text" id="name"/></form>
          </body>
          </html>

          mfg NAG

          --
          signatur
        2. Hi,

          Da fällt mir wieder ein, dass es bei XHMTL 1.0 Strict umgekehr _zwingend_ erforderlich ist.

          Wie kommste denn darauf?

          http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd:
          <!ENTITY % Block "(%block; | form | %misc;)*">

          Du kennst aber schon den Unterschied zwischen strict und transitional?
          Ich frag nur, weil Du mit der transitional-DTD argumentierst, obwohl es um strict geht.

          Außerdem geht es ja darum, daß form ein blocklevel-Element enthalten muß.

          cu,
          Andreas

          --
          Warum nennt sich Andreas hier MudGuard?
          Schreinerei Waechter
          Fachfragen per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.
          1. Du kennst aber schon den Unterschied zwischen strict und transitional?

            Nö, Andreas. Kannste mal erklärn?

            Ich frag nur, weil Du mit der transitional-DTD argumentierst, obwohl es um strict geht.

            Ich hatte schon die Strict-DTD beim Wickel, bloß beim Verfassen des Postings die falsche reinkopiert.

            Allerdings ist mir nicht klar, was ich mir dieser Zeile aus der DTD eigentlich wollte. %-/

            Außerdem geht es ja darum, daß form ein blocklevel-Element enthalten muß.

            Im OP hieß es:

            ich habe ein formular in einem div verpackt

            Den Sprung von da aus zu etwas in ein Formular packen hab ich werder nach- noch mitvollzogen.

            Gunnar

            --
            I never intended HTML source code (the stuff with the angle brackets) to be seen by users. […] To my surprise, people quickly became familiar with the tags and started writing their own HTML documents directly. (Tim Berners-Lee in Weaving the Web)
        3. Hallo Gunnar.

          Wie kommste denn darauf?

          Gut, die Beschränkung auf DIV war missverständlich.

          Ich meinte nur, dass es nicht mehr erlaubt ist, Elemente wie <input /> _direkt_ in das <form></form> Element zu schreiben.

          Gruß, Ashura

          --
          Selfcode: sh:( fo:) ch:? rl:( br:^ n4:& ie:{ mo:) va:) de:> zu:) fl:( ss:| ls:[ js:|
          Try it: Become an Opera Lover in 30 days
          1. Ashura,

            Ich meinte nur, dass es nicht mehr erlaubt ist, Elemente wie <input /> _direkt_ in das <form></form> Element zu schreiben.

            <!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
            ist für Strict und Transitional gleich, aber

            Strict:
            <!ENTITY % form.content "(%block; | %misc;)*">

            Transitional:
            <!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">

            Und mit XHTML hat das auch nichts zu tun; entsprechendes gilt auch für HTML 4.01 Strict vs. Transitional.

            Gunnar

            --
            I never intended HTML source code (the stuff with the angle brackets) to be seen by users. […] To my surprise, people quickly became familiar with the tags and started writing their own HTML documents directly. (Tim Berners-Lee in Weaving the Web)
            1. Hallo Gunnar.

              Und mit XHTML hat das auch nichts zu tun; entsprechendes gilt auch für HTML 4.01 Strict vs. Transitional.

              Meinetwegen. Wieder etwas gelernt. ;)

              Gruß, Ashura

              --
              Selfcode: sh:( fo:) ch:? rl:( br:^ n4:& ie:{ mo:) va:) de:> zu:) fl:( ss:| ls:[ js:|
              Try it: Become an Opera Lover in 30 days
    2. hi,

      Wozu? (form ist ein Blockelement.)

      kam vielleicht falsch rüber, aber das div schließt nicht NUR das formular ein - da sind noch viele andere elemente drin...

      mit WAS ich es formatieren will, ist eigentlich auch nicht sooo wichtig,
      aber ich kann das formular im MSIE halt einfach nicht per "#div tag" ansprechen... meine frage ist also eher wie ich das hinkriege.

      grüße,
      martin

      1. Hallo,

        aber ich kann das formular im MSIE halt einfach nicht per "#div tag" ansprechen... meine frage ist also eher wie ich das hinkriege.

        Ohne das relevante HTML / CSS zu kennen, gibt es keinen ersichtlichen Grund, warum du mit - #divname form - nicht auf das form-element zugreifen kannst.

        mfg NAG

        --
        signatur