Profile

Work

I am a Full-Stack Web & Software Developer with over fifteen years of experience. Over countless hours I have discovered that I have a passion and talent for creating works that are both highly functional and technically sound.

I have also discovered that I have a knack for understanding new theories & concepts – I am an adamant perfectionist when it comes to just about anything I do.

Current Skill set

Web
  • Responsive Mobile first HTML & CSS3 – Bootstrap, SASS
  • JavaScript (Vanilla JS, JQuery, Angular)
  • PHP (Web Server & CRON)
  • CRM / CMS packages – WordPress, OsCommerce, Marketo
  • MySQL
  • Git
  • SEO & PPC
Applications
  • Java
  • Python
Legacy Technology
  • ASP (classic)
  • Visual Basic
  • Adobe Flash
Software Packages
  • Adobe Photoshop
  • MySQL
  • Jet Brains Web Suite
  • Microsoft Word
  • Microsoft Excel
  • Microsoft Access
  • Maya 3d
  • and more…

Study

At the start of 2019, I am entering my 4th year of a 6 year course Studying a Bachelor of
Computer Science with gaming specialisation at Charles Sturt University

Hobbies

Pyrotechnic

A license Pyrotechnician in the state of N.S.W. Australia for over twenty years, performing
professional grade pyrotechnic shows ranging from from Chinese String Crackers, Indoor Close
Proximity Fireworks, Aerial Shells up to 125mm and Aerial Salutes up to 75mm.

A founding member of the Pyrotechnics Industry Association of Australia (PIAA), Based in Sydney
but have performing shows all over NSW for all types of events.

Car Enthusiast

An active member in the Skylines Australia NSW car club I regularly volunteer to help run events.

Social Media

You can connect with me professionally on LinkedIn,
or stalk me through Twitter

Portfolio

Employment

Wizardry Fireworks

PRODOCOM Australia

Hannover Fairs Australia

E-Web Marketing

Freelance Websites

Personal Projects

Tipping Comp

cruizen’

National Pyrotechnics

iblott accessories

Blog

Understanding the Difference Between Relative, Absolute, and Fixed Positioning in CSS

When designing web pages, understanding CSS positioning is essential for creating layouts that look and behave as intended. Among the positioning options in CSS, relative, absolute, and fixed positioning are commonly used but can be confusing for beginners. This article will break down the differences and provide practical examples to help you master these positioning techniques.

What is CSS Positioning?

CSS positioning is a set of properties that determine how elements are placed on a web page. The position property in CSS allows you to specify the type of positioning method used for an element. The most common values for the position property are:

  1. static (default positioning)
  2. relative
  3. absolute
  4. fixed
  5. sticky (not covered in this article)

Each of these values serves different purposes. Here, we will focus on relative, absolute, and fixed positioning.


Relative Positioning

When an element is set to position: relative, it is positioned relative to its normal document flow. This means the element remains in the natural layout of the page but can be offset using the top, right, bottom, or left properties.

Key Characteristics:

  • The element’s original space in the document flow is preserved.
  • Offsets (e.g., top: 10px) move the element relative to its starting position.

Example:

<div style="position: relative; top: 20px; left: 10px; background-color: lightblue;">
  This is a relatively positioned element.
</div>

In this example, the element is shifted 20px down and 10px to the right from its original position, but its space in the document flow remains intact.


Absolute Positioning

With position: absolute, the element is removed from the normal document flow and positioned relative to the nearest positioned ancestor (an element with a position value other than static). If no positioned ancestor exists, it is positioned relative to the initial containing block (usually the <html> element).

Key Characteristics:

  • The element does not occupy space in the normal document flow.
  • Offsets (e.g., top: 0; left: 0) are calculated based on the nearest positioned ancestor.

Example:

<div style="position: relative; width: 300px; height: 200px; background-color: lightgray;">
  <div style="position: absolute; top: 10px; left: 20px; background-color: lightgreen;">
    This is an absolutely positioned element.
  </div>
</div>

Here, the green box is positioned 10px from the top and 20px from the left of its nearest positioned ancestor (the light gray box).


Fixed Positioning

When an element is set to position: fixed, it is positioned relative to the viewport and remains in the same place even when the page is scrolled.

Key Characteristics:

  • The element is removed from the normal document flow.
  • Offsets are calculated relative to the viewport.
  • The element stays fixed in its position during scrolling.

Example:

<div style="position: fixed; bottom: 0; right: 0; background-color: lightcoral; padding: 10px;">
  This is a fixed element.
</div>

In this example, the element stays fixed at the bottom-right corner of the viewport, regardless of scrolling.


Key Differences at a Glance

FeatureRelative PositioningAbsolute PositioningFixed Positioning
Reference PointItself (original position)Nearest positioned ancestorViewport
Normal Document FlowPreservedRemovedRemoved
Scroll BehaviorMoves with the pageMoves with the pageFixed in place

Practical Use Cases

  1. Relative Positioning: Useful for small adjustments or as a reference point for child elements.
  2. Absolute Positioning: Ideal for creating tooltips, dropdown menus, or floating elements within a container.
  3. Fixed Positioning: Commonly used for sticky headers, footers, or call-to-action buttons that should remain visible during scrolling.

Conclusion

Understanding the differences between relative, absolute, and fixed positioning is crucial for building dynamic and responsive web layouts. Each positioning method serves a unique purpose, so choosing the right one depends on the design requirements of your project. Experiment with these techniques to gain confidence and create visually appealing web pages.

Published by
February 6, 2025 9:42 am

Comments are closed here.


Creative

I studied Digital Media for 12 months at Mt Druitt TAFE. While  doing so we studied The 3D Modeling Program ‘Maya’. During the course I produced a number of 3D scenes and a couple of 3D animated movies.

I have also played in other programs such as Bryce 3D, 3D Studio Max, Lightwave, Vue D’esprit and a few others. However, i have always returned to Maya as a personal preference.

Bellow are a number of works that i have produced from these various programs.

Bryce 3D: Balls

Vue D’esprit: Sulfuric

Maya: Living Room

Maya: Gauntlet

Loading...