Solved

Valid webkit-box-sizing

Posted on 2016-09-07
5
39 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
  • 3
  • 2
5 Comments
 
LVL 54

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 54

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 54

Accepted Solution

by:
Julian Hansen earned 500 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with exporting to excel 4 28
.NET 2008 VB and C# 6 28
Underline in nav for the page that you are currently on. 1 10
Hide Table in merge 3 11
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

831 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