Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Valid webkit-box-sizing

Posted on 2016-09-07
5
Medium Priority
?
60 Views
Last Modified: 2016-09-07
I inherited a web site and one of the pages has the following code on it.

What is the VALID setting for this?
ScreenSP.png
0
Comment
Question by:lrbrister
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 41787921
box-sizing (https://developer.mozilla.org/en/docs/Web/CSS/box-sizing)

Is the style declaration to control how padding and borders are treated with respect to the container (see box model)

The box model says if you have a container with width X then border, padding will be applied to the outside of the box - making the width (and height) greater.

When box-sizing is set to border-box then any padding / borders are included in the width of the container i.e. they don't increase the size of the container.
-webkit and -moz are just the Chrome (webkit) and FireFox (moz) specific versions of the style. As most browsers support this style the custom styles are no longer needed.
0
 

Author Comment

by:lrbrister
ID: 41787936
Julian,
  So I can remove that from the Page?
0
 
LVL 58

Expert Comment

by:Julian Hansen
ID: 41787944
Not sure why they have a zero in there - won't be recognised as far as I know.
Valid values are
content-box => Default box model - borders and padding outside the box.
border-box => keep width unchanged - put borders and padding inside the box.
0
 
LVL 58

Accepted Solution

by:
Julian Hansen earned 2000 total points
ID: 41787950
I believe so - I tried to find a use case for a zero - could not.
Tried a test page setting it to zero - browser ignores it - removes it from the styles in the console so I am assuming it does nothing.

Sometimes there are quirky things that unconventional use of styles help to achieve - but they are risky because they don't necessarily have a long life span.

I would remove it and see what the effect is. If there is an effect it should be one of two things.
Content will expand (in which case make it border-box)
Content will contract (in which case make it content-box)
0
 

Author Closing Comment

by:lrbrister
ID: 41787952
I removed it... no changes at all that I can see,

Will just wait for someone to yell.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question