Background

HTML Background Position Code

Control exactly where a background image sits within its element.

Live Tool
bg-position.css Live

          
Preview

1How To Use

Follow these steps — no coding experience needed.

  1. Pick a 3x3 positionChoose any combination of left/center/right and top/center/bottom.
  2. Copy the CSSPairs naturally with background-repeat: no-repeat.
  3. Fine-tune laterYou can also use exact percentages or pixel values instead of keywords.

2Example Output

What this code looks like once it's on a real page.

3Browser Compatibility

BrowserSupportNotes
Chrome✓ SupportedFull support
Firefox✓ SupportedFull support
Safari✓ SupportedFull support
Edge✓ SupportedFull support
Opera✓ SupportedFull support
Mobile browsers✓ SupportedFull support, iOS & Android

Supported in every current browser — Chrome, Firefox, Safari, Edge and Opera all render this identically, on both desktop and mobile.

Related Pages

More tools that pair naturally with this one.