How albertprofecet/17-position_absolute works
Project type and purpose
• This is a small, front-end-only static website whose sole purpose is to demonstrate CSS positioning (absolute vs. relative).
• There is no backend or dynamic logic; the entire “application” consists of an HTML file and an associated stylesheet.
File structure
• Top level:
• INDEX.HTML – the entry point
• style.css – the CSS file defining styles and positioning rules
• README.md – a brief note about “Position Absolute i relative”
• No scripts, no server code, no build tools, no tests—this is pure static content.
README for additional insights
• The README confirms the focus: illustrating how CSS’s ‘position: absolute’ and ‘position: relative’ work.
• No reference to frameworks, build processes, or third-party dependencies.
Components
a. Static File Host (e.g., web server or CDN)
– SERVES: index.html, style.css
b. Browser
– Requests the files
– Contains subcomponents:
• HTML Parser / DOM Builder
• CSS Parser / Style Computation
• Layout Engine (applies absolute/relative positioning rules)
• Rendering / Paint Layer
c. User’s Viewport
Relationships and interactions
• The Browser issues an HTTP GET to the Static File Host for index.html
• index.html has a <link> to style.css → Browser issues a second GET
• The HTML Parser builds the DOM, the CSS Parser builds the CSSOM
• The Layout Engine merges DOM + CSSOM to compute final on-screen positions (absolute vs. relative)
• Finally, the Rendering Engine paints the positioned elements in the user’s viewport.
Architectural patterns and design principles
• Single-page static architecture
• Clear separation of concerns: content (HTML) vs. presentation (CSS)
• No client-side scripts or build step simplifies the model to “request → parse → render.”