News for hackers. Stuff that matters.
Re:Ask HN: Where to find co-developers for side projects? by davchana on Friday June 16, 2017 @11:15AM (#14569707)
Thats a genius idea for making sure none of the elements goes our of viewport width. I always had this issue that a div has standard border padding, and width:100% pushes its right to out of viewport. Can't wait to try this.

Just few genuine questions, as I am learning, specifically in making static fixed header bars for few of my fun projects.

Does the meta tag in ur comment needs closure(>), or is it something I might have never come across?

Does implying a max-width 100 in percentage means every element gets max 100% of "its" parent element, which can be traced down back to HTML as super parent of all tags, and thus if I could use "vw" viewport width as units instead of %?

Re:Ask HN: Where to find co-developers for side projects? by 4lun on Friday June 16, 2017 @11:25AM (#14569789)
> I always had this issue that a div has standard border padding, and width:100% pushes its right to out of viewport.

You likely want `box-sizing: border-box`: https://www.paulirish.com/2012/box-sizing-border-box-ftw/

Re:Ask HN: Where to find co-developers for side projects? by nfriedly on Friday June 16, 2017 @11:31AM (#14569838)
> I always had this issue that a div has standard border padding, and width:100% pushes its right to out of viewport.

What you probably want, in addition to the max-width, is

    box-sizing: border-box;
Then the border is included in the width calculation.

> Does the meta tag in ur comment needs closure(>), or is it something I might have never come across?

If you're writing XHTML, then you need to end the tag with /> instead of >. But for HTML5, it's valid as is. And browsers get it right either way.

> Does implying a max-width 100 in percentage means every element gets max 100% of "its" parent element, which can be traced down back to HTML as super parent of all tags, and thus if I could use "vw" viewport width as units instead of %?

That's a good question. I'm not familiar with the vw unit, but yea, that sounds basically right.