Tantek hack or box-sizing

Discussion in 'HTML' started by Nico Schuyt, Jun 25, 2003.

  1. Nico Schuyt

    Nico Schuyt Guest

    Which method is to be preferred to prevent that padding is added to the box
    size:
    The Tantek hack or adding -moz-box-sizing: border-box; box-sizing:
    border-box; to the properties of the div?

    Nico
     
    Nico Schuyt, Jun 25, 2003
    #1
    1. Advertising

  2. Nico Schuyt

    spaghetti Guest

    "Nico Schuyt" <> wrote in message
    news:3ef95632$0$28892$...
    > Which method is to be preferred to prevent that padding is added to the

    box
    > size:
    > The Tantek hack or adding -moz-box-sizing: border-box; box-sizing:
    > border-box; to the properties of the div?


    I seldom find the need to use any hacks. Anywhere I have a fixed size I
    simply don't use padding, I just disregard it as an option. But that's
    because usually I have a few "container" <div>s that are fixed size without
    padding. All the block elements inside these containers naturally stretch to
    fill the full width, so I add margins to these, or I can add padding to the
    sub elements as well, because they don't have a size explicitly set.

    Basically I use alot of margins to place my boxes around inside padding-less
    "fixed size" block elements.

    But don't trust me, I have a strange negative-margin fetish. Which is
    probably just as bad as using hacks, I guess.
     
    spaghetti, Jun 25, 2003
    #2
    1. Advertising

  3. Nico Schuyt

    Isofarro Guest

    Nico Schuyt wrote:

    > Which method is to be preferred to prevent that padding is added to the
    > box size:
    > The Tantek hack or adding -moz-box-sizing: border-box; box-sizing:
    > border-box; to the properties of the div?


    The Tantek hack IIRC gives an IE-specific width, followed by a syntax that
    hides the rest of the style from IE so reasserts the correct width.

    The -moz-box-sizing is only supported by Mozilla (AIUI).

    So the question you need to answer is - what do you need to happen to CSS
    capable browsers other than IE and recent versions of Mozilla? Answer that,
    and you'll also have an answer to your question.


    --
    Iso.
    FAQs: http://html-faq.com http://alt-html.org http://allmyfaqs.com/
    Recommended Hosting: http://www.affordablehost.com/
    Web Standards: http://www.webstandards.org/
     
    Isofarro, Jun 26, 2003
    #3
    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. Fabrizio

    ASPX page sizing

    Fabrizio, Nov 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    340
    Teemu Keiski
    Nov 27, 2003
  2. Tim Marsden

    Sizing and positioning of dynamic controls

    Tim Marsden, Feb 25, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    2,983
    Steven Cheng[MSFT]
    Mar 2, 2004
  3. Tim Burda

    Image Sizing Issue

    Tim Burda, Aug 5, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    415
    Curt_C [MVP]
    Aug 5, 2004
  4. John

    Sizing fields

    John, Oct 8, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    354
    Jeffrey Palermo [MCP]
    Oct 9, 2004
  5. Gnarlodious
    Replies:
    4
    Views:
    17,641
    elizas
    May 5, 2010
Loading...

Share This Page