
Anonymous A. answered 01/05/20
CSS Expert with 10+ years of experience
Regardless of the platform, CSS is still CSS. It doesn't matter if you use CSS on an app, a website, or wherever.
As far as automatic 100% width, that's a concept of HTML called "block level elements".
Block level elements are elements that act as whole blocks of content, think of them like a brick in a wall but that extend the entire wall, hence, they are 100% as wide as the container they sit in.
A few examples of block level elements are:
- Headings: <h1>…<h6>
- Paragraph: <p>
- DIVs: <div>, <section>, <aside>
- Header: <header>
- Footer: <footer>
- Lists and list items: <ul>, <ol>, <dl>, <li>
etc.
More info on Mozilla Developer Network (MDN): https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements