Jeena Paradies: Was kann der IE eigentlich?!?

Beitrag lesen

Hallo,

Nein, es bleibt dabei, ich bekomme nur die schon zitierte Fehlermeldung.
Und zwar browserunabhängig (IE, FF, Opera).

Dann liegt es an irgendetwas anderes als am browser, vielleicht ein Proxy?

Wie auch immer, damit du das lesen kannst hier das c&p von der Seite

---------------------------

Internet Explorer and the Box Model | August 04, 2005

Everybody knows that Internet Explorer gets the CSS box model wrong. According to the specs, the width property relates to the width of the content area. Padding, borders and margins are added to this, in order to calculate the total size of the box. Internet Explorer incorrectly sees width as the sum of the content width, padding and borders, adding only margins to calculate the size of the box. This means that if you specify a dimension and then add padding, the box will be smaller in IE than every other browser.

Many people have berated IE for this flaw, however I actually think Microsoft got this one right. I personally think the W3C box model is flawed and feel that Microsoft’s original approach makes much more sense. Here is the reason why.

Quite often I’ll have a floated element, inside another floated element. I’ll want the child element to take up the full available width, so I set it to be 100% wide. Now I want to create a fixed width gutter on the inside of the element to let the contents breath. To do this you’d naturally think about giving the element padding. However wait a minute, the total width of your box is now larger than the width of the parent and your layout is shot to hell.

There are ways around this. For instance you could apply your padding to the elements children, either explicitly or using the child selector. Alternatively you can add in an extra element. However both these methods are messy and a bit of a hack. If the parent element has a known width, what I usually end up doing is setting the width of the child explicitly to account for my desired padding. However this seems really unnecessary and always makes me feel slightly uncomfortable.

This issue is probably the main reason why I shy away from flexible layouts. Sometimes you just don’t want to set your padding as a percentage, the available options are all less than satisfactory. It would make so much more sense if padding was applied on the “inside” rather than the “outside”, the way IE5 does.

Failing that, I’ve often wished I could include simple sums in my width declarations. Maybe something like this.

#wrapper {  
  width: 100% - 24px;  
  padding: 0 12px;  
}

Now something like that could come in very handy.

---------------------------

Grüße
Jeena Paradies

0 57

Was kann der IE eigentlich?!?

MatMel
  • css
  1. 0
    Orlando
    1. 0
      Ashura
      1. 0

        gray / grey

        Ashura
        1. 0
          MatMel
          1. 0
            opi
            1. 0
              MatMel
              1. 0
                opi
  2. 0
    Der Martin
    1. -1
      opi
      1. 0
        Der Martin
        1. 0
          opi
          1. 1
            Fabian Transchel
            1. 0
              opi
              1. 0
                Fabian Transchel
                1. 0
                  opi
                  1. 0
                    Fabian Transchel
                    1. 0
                      opi
                      1. 0
                        Fabian Transchel
                        1. 0
                          opi
                          1. 0
                            Gunnar Bittersmann
                            1. 0
                              opi
                          2. 0
                            Fabian Transchel
                            1. 0
                              opi
                              1. 0
                                Der Martin
                                1. 0
                                  opi
                              2. 0
                                Fabian Transchel
              2. 0
                Gunnar Bittersmann
                1. 0
                  opi
      2. 0
        Gunnar Bittersmann
        1. 0
          opi
      3. 0

        TooCool-Initiative

        Fabian Transchel
        • menschelei
        1. 0
          opi
        2. 0
          Gunther
          1. 0
            Fabian Transchel
    2. 0
      Gunnar Bittersmann
      1. 0
        Der Martin
        1. 0
          Gunnar Bittersmann
      2. 0
        MudGuard
        1. 0
          Gunther
  3. 0
    opi
  4. 0
    Fabian Transchel
  5. 2
    Cheatah
    1. 0
      Jeena Paradies
      1. 0
        Der Martin
        1. 0
          Ashura
        2. 0
          Jeena Paradies
          1. 0
            Der Martin
            1. 0
              Ashura
              1. 0
                Der Martin
            2. 1
              Jeena Paradies
              1. 0
                Der Martin
      2. 0
        Cheatah
        1. 0
          Jeena Paradies
          1. 0
            Cheatah
  6. 0
    MatMel
    1. 0
      daniel84