height and width

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BenOne©

    height and width

    Hi all,

    For divs, do all browsers treat these the same?

    I've been assuming that width and height are inclusive of margin and padding,
    but the different appearance of my page in various browsers suggests to me my
    assumption is incorrect.
    --
    Ben Thomas

    Apparently less than 10% of accidents are caused by drivers exceeding the speed
    limit.
  • Brian

    #2
    Re: height and width

    BenOne© wrote:
    [color=blue]
    > For divs, do all browsers treat these the same?[/color]

    Treat what the same?
    [color=blue]
    > I've been assuming that width and height are inclusive of margin and padding,
    > but the different appearance of my page in various browsers suggests to me my
    > assumption is incorrect.[/color]

    Padding is the space between an element and its border. Margin is the
    space between elements.



    --
    Brian (remove "invalid" from my address to email me)

    Comment

    • BenOne©

      #3
      Re: height and width

      Brian wrote:[color=blue]
      > BenOne© wrote:
      >[color=green]
      >> For divs, do all browsers treat these the same?[/color]
      >
      >
      > Treat what the same?[/color]

      height and width of divs.
      [color=blue]
      >[color=green]
      >> I've been assuming that width and height are inclusive of margin and
      >> padding, but the different appearance of my page in various browsers
      >> suggests to me my assumption is incorrect.[/color]
      >
      >
      > Padding is the space between an element and its border. Margin is the
      > space between elements.
      >
      > http://www.w3.org/TR/REC-CSS2/box.html
      >[/color]


      --
      Ben Thomas

      Apparently less than 10% of accidents are caused by drivers exceeding the speed
      limit.

      Comment

      • MasonC

        #4
        Re: height and width

        On Tue, 27 Apr 2004 02:04:04 GMT, BenOne© <nosp@m.thanks. mate> wrote:
        [color=blue]
        >Brian wrote:[color=green]
        >> BenOne© wrote:
        >>[color=darkred]
        >>> For divs, do all browsers treat these the same?[/color]
        >>
        >>
        >> Treat what the same?[/color]
        >
        >height and width of divs.
        >[color=green]
        >>[color=darkred]
        >>> I've been assuming that width and height are inclusive of margin and
        >>> padding, but the different appearance of my page in various browsers
        >>> suggests to me my assumption is incorrect.[/color]
        >>
        >>
        >> Padding is the space between an element and its border. Margin is the
        >> space between elements.
        >>
        >> http://www.w3.org/TR/REC-CSS2/box.html
        >>[/color][/color]
        A more-expert may give a detailed answer, but my memory tells me
        that the W3 world is virtual. In the real world browsers may treat
        margins and padding differently. (I've heard of something called
        "microsoft" )

        Mason C

        Comment

        • MasonC

          #5
          Re: height and width

          oh, by the way: 97.6 percent of accidents are caused by excessive speed

          Comment

          • Daniel R. Tobias

            #6
            Re: height and width

            MasonC <masonc@ix.netc om.xyz.com> wrote in message news:<u6tr80pso igibpl5kbcamb4r jlhopf8s50@4ax. com>...[color=blue]
            > oh, by the way: 97.6 percent of accidents are caused by excessive speed[/color]

            And 97.6 percent of statistics are made up.

            --
            Dan

            Comment

            • Andrew Thompson

              #7
              Re: height and width

              On 27 Apr 2004 05:02:43 -0700, Daniel R. Tobias wrote:
              [color=blue]
              > MasonC <masonc@ix.netc om.xyz.com> wrote in message news:<u6tr80pso igibpl5kbcamb4r jlhopf8s50@4ax. com>...[color=green]
              >> oh, by the way: 97.6 percent of accidents are caused by excessive speed[/color]
              >
              > And 97.6 percent of statistics are made up.[/color]

              Define 'cause' for starters..

              A study something to the effect of..
              'The causal attributions of young drivers'
              found that more experienced drivers had
              a higher rate of accepting responsibility
              for an accident.

              A less experienced driver was more likely
              to say 'I crashed because it was raining and
              the road was slippery'. The more seasoned
              driver would report 'I was travelling too
              fast in the rain'.

              (shrugs) Lies, damned lies ..and statistics,
              ...and 'studies' for that matter!

              Ultimately - "Never let the truth
              get in the way of a good story" ;-)

              --
              Andrew Thompson
              http://www.PhySci.org/ Open-source software suite
              http://www.PhySci.org/codes/ Web & IT Help
              http://www.1point1C.org/ Science & Technology

              Comment

              • Brian

                #8
                Re: height and width

                MasonC wrote:[color=blue]
                >
                > A more-expert may give a detailed answer,[/color]

                In other words, even though you have nothing meaningful to contribute,
                your fingers are itching to write something.
                [color=blue]
                > but my memory tells me that the W3 world is virtual.[/color]

                Uhh, yeah, the world wide web is a virtual space. There are no people
                living inside it. (You need to rely on some recollection to tell us that?)
                [color=blue]
                > In the real world[/color]

                "In the real world" always introduces a statement that can be safely
                ignored.
                [color=blue]
                > browsers may treat margins and padding differently.[/color]

                Not "may," but "do." And that's hardly a surprise, since they *are*
                different.


                [color=blue]
                > (I've heard of something called "microsoft" )[/color]

                Yes, MSIE, too, treats padding and margin differently.

                --
                Brian (remove "invalid" from my address to email me)

                Comment

                • Eric Jarvis

                  #9
                  Re: height and width

                  MasonC masonc@ix.netco m.xyz.com wrote:[color=blue]
                  >
                  > oh, by the way: 97.6 percent of accidents are caused by excessive speed
                  >[/color]

                  not at all true...I had cause to look the research up last month...it's a
                  lot less than the high nineties...and the main factor is not excessive
                  speed, it's the differential in speed between the fastest and slowest
                  traffic that has the biggest effect...which makes excessive speed a factor
                  in a hell of a lot of accidents but fewer than you are suggesting

                  as it happens a lot of the best research is available from the UK's
                  Department of Transport web site...which happens to be one of the best
                  made government web sites I've ever seen...it's actually fairly competent

                  --
                  eric

                  "live fast, die only if strictly necessary"

                  Comment

                  • BenOne©

                    #10
                    Re: height and width

                    MasonC wrote:[color=blue]
                    > oh, by the way: 97.6 percent of accidents are caused by excessive speed[/color]

                    Which doesn't necessarily mean they were exceeding the speed limit. Which the
                    authorities conveniently don't mention so they can justify increasing speeding
                    fines, lowering tolerances, and lowering speed limits.

                    --
                    Ben Thomas

                    Apparently less than 10% of accidents are caused by drivers exceeding the speed
                    limit.

                    Comment

                    • MasonC

                      #11
                      Re: height and width

                      On Tue, 27 Apr 2004 21:33:03 GMT, BenOne© <nosp@m.thanks. mate> wrote:
                      [color=blue]
                      >MasonC wrote:[color=green]
                      >> oh, by the way: 97.6 percent of accidents are caused by excessive speed[/color]
                      >
                      >Which doesn't necessarily mean they were exceeding the speed limit. Which the
                      >authorities conveniently don't mention so they can justify increasing speeding
                      >fines, lowering tolerances, and lowering speed limits.[/color]

                      shoot..... and I thought you were going to thank me for being
                      the only one to respond to your query. Did I drive too fast?
                      [color=blue]
                      >For divs, do all browsers treat these the same?[/color]
                      [color=blue]
                      >I've been assuming that width and height are inclusive of margin and padding,
                      >but the different appearance of my page in various browsers suggests to me my
                      >assumption is incorrect.[/color]

                      An expert could give a brief detailed statement of how margins and paddings differ
                      among browsers.


                      Comment

                      • BenOne©

                        #12
                        Re: height and width

                        MasonC wrote:[color=blue]
                        > On Tue, 27 Apr 2004 21:33:03 GMT, BenOne© <nosp@m.thanks. mate> wrote:
                        >
                        >[color=green]
                        >>MasonC wrote:
                        >>[color=darkred]
                        >>>oh, by the way: 97.6 percent of accidents are caused by excessive speed[/color]
                        >>
                        >>Which doesn't necessarily mean they were exceeding the speed limit. Which the
                        >>authorities conveniently don't mention so they can justify increasing speeding
                        >>fines, lowering tolerances, and lowering speed limits.[/color]
                        >
                        >
                        > shoot..... and I thought you were going to thank me for being
                        > the only one to respond to your query. Did I drive too fast?[/color]

                        Couldn't help myself. :) Thanks, BTW.[color=blue]
                        >
                        >[color=green]
                        >>For divs, do all browsers treat these the same?[/color]
                        >
                        >[color=green]
                        >>I've been assuming that width and height are inclusive of margin and padding,
                        >>but the different appearance of my page in various browsers suggests to me my
                        >>assumption is incorrect.[/color]
                        >
                        >
                        > An expert could give a brief detailed statement of how margins and paddings differ
                        > among browsers.[/color]

                        Waiting patiently.


                        --
                        Ben Thomas

                        Apparently less than 10% of accidents are caused by drivers exceeding the speed
                        limit.

                        Comment

                        • Barry Pearson

                          #13
                          Re: height and width

                          BenOne© wrote:[color=blue]
                          > MasonC wrote:[color=green]
                          >> On Tue, 27 Apr 2004 21:33:03 GMT, BenOne© <nosp@m.thanks. mate> wrote:[/color][/color]
                          [snip][color=blue][color=green][color=darkred]
                          >>>For divs, do all browsers treat these the same?[/color]
                          >>[color=darkred]
                          >>>I've been assuming that width and height are inclusive of margin and
                          >>>padding, but the different appearance of my page in various browsers
                          >>>suggests to me my assumption is incorrect.[/color]
                          >>
                          >> An expert could give a brief detailed statement of how margins and
                          >> paddings differ among browsers.[/color]
                          >
                          > Waiting patiently.[/color]

                          I'm a bit puzzled by this thread. Some experts have posted here, apparently
                          without answering your original question, even though they presumably know the
                          basis for the answer.

                          No, browsers don't all treat them the same. In particular, IE 5 screwed up
                          badly, and a Google search for
                          IE 5 box model
                          will reveal lots of stuff about it, and various workarounds.

                          Then for "compatibil ity" reasons the concept of being able to cause other
                          browsers to (nearly) emulate IE 5 arose, and a Google search for
                          quirks mode
                          will give you the sad tale. So authors can choose, to some extent, which other
                          browsers will also screw up.

                          (When I'm trying to match the sizes of elements to images such as photographs,
                          for example to make roll-over links, this particular issue tends to be my
                          biggest problem).

                          --
                          Barry Pearson


                          This site provides information & analysis of child support & the Child Support Agency in the UK, mainly for lobbyists, politicians, academics & media.



                          Comment

                          • BenOne©

                            #14
                            Re: height and width

                            Barry Pearson wrote:[color=blue]
                            > BenOne© wrote:
                            >[color=green]
                            >>MasonC wrote:
                            >>[color=darkred]
                            >>>On Tue, 27 Apr 2004 21:33:03 GMT, BenOne© <nosp@m.thanks. mate> wrote:[/color][/color]
                            >
                            > [snip]
                            >[color=green][color=darkred]
                            >>>>For divs, do all browsers treat these the same?
                            >>>
                            >>>>I've been assuming that width and height are inclusive of margin and
                            >>>>padding, but the different appearance of my page in various browsers
                            >>>>suggests to me my assumption is incorrect.
                            >>>
                            >>>An expert could give a brief detailed statement of how margins and
                            >>>paddings differ among browsers.[/color]
                            >>
                            >>Waiting patiently.[/color]
                            >
                            >
                            > I'm a bit puzzled by this thread. Some experts have posted here, apparently
                            > without answering your original question, even though they presumably know the
                            > basis for the answer.
                            >
                            > No, browsers don't all treat them the same. In particular, IE 5 screwed up
                            > badly, and a Google search for
                            > IE 5 box model
                            > will reveal lots of stuff about it, and various workarounds.
                            >
                            > Then for "compatibil ity" reasons the concept of being able to cause other
                            > browsers to (nearly) emulate IE 5 arose, and a Google search for
                            > quirks mode
                            > will give you the sad tale. So authors can choose, to some extent, which other
                            > browsers will also screw up.
                            >
                            > (When I'm trying to match the sizes of elements to images such as photographs,
                            > for example to make roll-over links, this particular issue tends to be my
                            > biggest problem).
                            >[/color]

                            Thanks Barry. Looks like I'll have to design it for IE with a link on the page
                            for non-IE users to get a page that works. Or I could go for a more boring
                            layout with a menu bar at top and bottom of page instead of a side menu.

                            --
                            Ben Thomas

                            Apparently less than 10% of accidents are caused by drivers exceeding the speed
                            limit.

                            Comment

                            • Barry Pearson

                              #15
                              Re: height and width

                              BenOne© wrote:[color=blue]
                              > Barry Pearson wrote:[color=green]
                              >> BenOne© wrote:[/color][/color]
                              [snip][color=blue][color=green][color=darkred]
                              >>>>>For divs, do all browsers treat these the same?[/color][/color][/color]
                              [snip][color=blue][color=green][color=darkred]
                              >>>Waiting patiently.[/color][/color][/color]
                              [snip][color=blue][color=green]
                              >> No, browsers don't all treat them the same. In particular, IE 5
                              >> screwed up badly, and a Google search for
                              >> IE 5 box model
                              >> will reveal lots of stuff about it, and various workarounds.[/color][/color]
                              [snip][color=blue][color=green]
                              >> (When I'm trying to match the sizes of elements to images such as
                              >> photographs, for example to make roll-over links, this particular
                              >> issue tends to be my biggest problem).[/color]
                              >
                              > Thanks Barry. Looks like I'll have to design it for IE with a link on
                              > the page for non-IE users to get a page that works. Or I could go for
                              > a more boring layout with a menu bar at top and bottom of page
                              > instead of a side menu.[/color]

                              That shouldn't be necessary. Once you realise that the problem exists, it
                              should be possible to design round it. Most people do.

                              For example, I had to have an exact 180px sidebar in these templates (below),
                              because I had a background photograph for the rollovers. I ended up doing
                              various things to stop IE 5 blowing the layout apart, but I think what I got
                              was better than having a separate page. (It probably still blows apart in IE
                              Mac, but that is a grotty browser!)


                              --
                              Barry Pearson


                              This site provides information & analysis of child support & the Child Support Agency in the UK, mainly for lobbyists, politicians, academics & media.



                              Comment

                              Working...