Was I the only one that for some reason got a Youtube-video that all of a sudden popped up and started playing a short video about ESPN being hacked or something? Might have been a glitch of some sort, but I'd suggest OP should check his source code to see if he hasn't been compromised of some sort.
omg hacked! Nah it's cool. I wired that up. The unicorns konami trigger that was featured in the video was introduced by my blog so it's a bit of an homage or something. Thxthx.
* { box-sizing: border-box } FTW
61–70 of 90 posts
Re: * { box-sizing: border-box } FTW
#62The W3C box model spec forms a set of consistent rules that make sense. It's not the spec that's wrong. Just because it doesn't fit with your original intuition doesn't make it wrong.
The W3C box model would only be useful if the W3C also provided a way to specify a width as "percentage of parent box width minus a fixed number of units" to compensate for the padding adding to the total width. However, they did not, which means that in order to make a decent flowing layout, you have to change your document markup to insert artificial and otherwise unnecessary elements (DIV tags usually). Thus the o…
Works in Firefox and IE. At some point WebKit will catch up, I assume.
Re: * { box-sizing: border-box } FTW
#63This article was an eye-opener - I write CSS all the damn time and hadn't even clocked box-sizing yet. I don't wanna know how many hours I've spent calculating widths-after-padding(-but-wait-it's-different-on-both-sides) and commenting the CSS so other developers know why this element is width: 169px even though the container is 200px... Not to mention: textarea { width:100%; padding:20px; oh shit. }
This may take some getting used to.
Re: * { box-sizing: border-box } FTW
#64Re: * { box-sizing: border-box } FTW
#65Earlier quoted context omitted.
That's what `box-sizing: border-box` is! You can't just change the default because that would break existing websites and the W3C's box model was adopted by every other browser.
Sure you can change the existing default, that's what people wanted IE to do.
Re: * { box-sizing: border-box } FTW
#66Re: * { box-sizing: border-box } FTW
#67Earlier quoted context omitted.
What article? doodling
I don't know what I did, but after I doodled a bit and scrolled the page around using the middle mouse button, this youtube video popped up over the page: http://www.youtube.com/watch?v=E6x_-xKl-Fg Also the konami code makes the same sort of unicorns appear that were on the video.
Re: * { box-sizing: border-box } FTW
#68Where the traditional box model starts to make sense is with fixed-size elements, such as images. Adding padding to an element shouldn't alter the dimensions of the contents within the element.
Re: * { box-sizing: border-box } FTW
#69Re: * { box-sizing: border-box } FTW
#70Earlier quoted context omitted.
The W3C box model would only be useful if the W3C also provided a way to specify a width as "percentage of parent box width minus a fixed number of units" to compensate for the padding adding to the total width. However, they did not, which means that in order to make a decent flowing layout, you have to change your document markup to insert artificial and otherwise unnecessary elements (DIV tags usually). Thus the o…
At this point the W3C is in fact working on providing such a thing. "width: calc(50% - 20px)". Works in Firefox and IE. At some point WebKit will catch up, I assume.