Box sizing suddenly stopped working

I´m using the box-sizing: border-box; element to make my boxes on my website behave the same on multiply browsers. It has worked perfectly great since I started create the website but today the box-sizing element suddenly stopped working. I´ve no clue on what´s can be the problem. Help would be much appreciated!

Here´s a link to my website: http://amazive.com As you can see, all the boxes have put the padding "outside" instead of "inside" the boxes.

This is my reset code:

* {
    margin:0; 
    padding:0;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

Thanks, Fredrik

Answers


Loading your site I see the following error in the console:

Selector expected.  Ruleset ignored due to bad selector. main.css:1

If you look at the first line of your main.css file you'll see it is:

</*****************************************************

Remove the leading angle bracket so it looks like:

/*****************************************************

From what I gather you want box-sizing; border-box; to be on all of your elements? To do it use this code

/* apply a natural box layout model to all elements */
*, *:before, *:after {
  -moz-box-sizing: border-box; 
  -webkit-box-sizing: border-box; 
  box-sizing: border-box;
 }

Here is a codepen sample: http://codepen.io/camdixon/pen/DgrGC

I got the answer from here: http://www.paulirish.com/2012/box-sizing-border-box-ftw/

A more detailed answer and IE tricks found here: * { Box-sizing: border-box; } : To border-box or not to border-box all elements?


Need Your Help

Stop New Tab From Opening

javascript html css mailchimp

I'm using mailchimp to create a signup sheet and every time the submit button is pressed, a new tab will open that confirms your subscription to the mailchimp email list. I want it to run as a sort...

Any way to improve accuracy of getCurrentPosition() coordinates other than enableHighAccuracy?

javascript jquery google-maps google-maps-api-3 geolocation

My intention is to utilize the coordinates that are returned by geolocation in order to generate directions to a given destination, without the visitor having to manually input their address. Howev...