Mobile and desktop views are independent applications. They share HTML and JavaScript but use completely separate CSS for layout. Neither view's layout should affect the other.
By Pawan Nayar · from the LLOS AI Learning record
Mobile and desktop views are independent applications.
They share HTML and JavaScript but use completely separate CSS for layout. Neither view's layout should affect the other.
A developer must treat mobile and desktop as two separate apps. They should use media queries to define distinct CSS layouts for each. Base CSS should only handle visual styles like colors and fonts, not layout. Layout properties like width, height, and display must go inside media queries. This prevents styles from one view from affecting the other.
A developer creates a website. They put `display: none;` for a mobile navigation bar in the base CSS. When the website loads on a desktop, the mobile navigation bar is hidden. But if a different CSS rule later overrides the base CSS, the mobile bar might appear on desktop. The correct way is to put `display: none;` for the mobile bar inside the desktop media query.
Resolved from this lesson's own record — real definitions, not invented for this page.
More from the same record, pulled by shared topic — not written new for this page.
Using `overflow:hidden` and `max-height` on a section wrapper can hide content. For example, buttons at the bottom of a section might disappear.
A developer should use this carousel for 4 to 12 items. These items can be movies, books, tools, or examples.
A developer must treat mobile and desktop as two separate applications. They share HTML and JavaScript.
The `.movie-section` is a main part of the page. It has a warm background color.
Mobile and desktop views are independent applications. They share HTML and JavaScript but use completely separate CSS for layout. Neither view's layout should affect the other.