Position utilities - Utilities - Spectre.css CSS Framework
Author: Yan Zhu
Description: Position utilities are used for useful layout and position things, including clearfix, float, position and margin/padding utilities. Spectre.css CSS Framework is a lightweight, responsive and modern CSS framework for faster and extensible development.

PayPal GitHub

## SPECTRE

DOCS
Getting started

- Installation
- Custom version
- Browser support
- What's new

Elements

- Typography
- Tables
- Buttons
- Forms
- Icons.css
- Labels
- Code
- Media

Layout

- Flexbox grid
- Responsive
- Hero
- Navbar

Components

- Accordions
- Avatars
- Badges
- Bars
- Breadcrumbs
- Cards
- Chips
- Empty states
- Menu
- Modals
- Nav
- Pagination
- Panels
- Popovers
- Steps
- Tabs
- Tiles
- Toasts
- Tooltips

Utilities

- Colors
- Cursors
- Display
- Divider
- Loading
- Position
- Shapes
- Text

Experimentals

- 360-Degree Viewer
- Autocomplete
- Calendars
- Carousels
- Comparison sliders
- Filters
- Meters
- Off-canvas
- Parallax
- Progress
- Sliders
- Timelines

### Position utilities#

Position utilities are used for useful layout and position things, including clearfix, float, position and margin/padding utilities.

    <!-- clear float -->
    <div class="clearfix"></div>
    <!-- float: left and right -->
    <div class="float-left"></div>
    <div class="float-right"></div>
    <!-- position: relative, absolute, fixed and sticky -->
    <div class="p-relative"></div>
    <div class="p-absolute"></div>
    <div class="p-fixed"></div>
    <div class="p-sticky"></div>
    <!-- centered block -->
    <div class="p-centered"></div>

    <!-- m-1 {margin: 4px;} m-2 {margin: 8px;} -->
    <div class="m-1"></div>
    <div class="m-2"></div>
    <!-- margin in 4 directions. mt-1 {margin-top: 4px;} mt-2 {margin-top: 8px;} -->
    <div class="mt-1"></div>
    <div class="mt-2"></div>
    <!-- mx-1 {margin-left: 4px; margin-right: 4px;} -->
    <div class="mx-1"></div>
    <div class="mx-2"></div>
    <div class="my-1"></div>
    <div class="my-2"></div>
    <!-- p-1 {padding: 4px;} p-2 {padding: 8px;} -->
    <div class="p-1"></div>
    <div class="p-2"></div>
    <!-- padding in 4 directions. pt-1 {padding-top: 4px;} pt-2 {padding-top: 8px;} -->
    <div class="pt-1"></div>
    <div class="pt-2"></div>
    <!-- px-1 {padding-left: 4px; padding-right: 4px;} -->
    <div class="px-1"></div>
    <div class="px-2"></div>
    <div class="py-1"></div>
    <div class="py-2"></div>

GitHub · Twitter · PayPal Donate · Patreon Sponsor · Version

Designed and built with ♥ by Yan Zhu. Licensed under the MIT License.