Skip to content

Conversation

@CaptainTech205
Copy link

Description

Created a new directory "background-position-x" in codecademy_docs\content\css\concepts\background\terms and a new file within that directory called "background-position-x.md". The markdown file describes the CSS property background-position-x and shows syntax and example.

Issue Solved

Closes #8197

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

@CLAassistant
Copy link

CLAassistant commented Feb 6, 2026

CLA assistant check
All committers have signed the CLA.

@mamtawardhani mamtawardhani self-assigned this Feb 9, 2026
Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @CaptainTech205, I've requested changes in this entry and also can you please attach the output image to this PR?

Let me know once the changes are done, thank you! 🚀

Comment on lines +1 to +17
---
Title: CSS background-position-x
Description: Sets the inital horizontal position of a background image.
Subjects:
- CSS
- Web design
- Web Development
Tags:
- Layout
- Background
- HTML
CatalogContent:
- Learn CSS
- UX Designer
- Learn Intermediate CSS
- Front-End Engineer
- Full-Stack Engineer
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to tags, subjects and catalog content for the correct data. And all of them need to be enclosed in single quotes (' ')

Comment on lines +24 to +42
```css
/* Keyword values */
background-position-x: left;
background-position-x: right;
background-position-x: center;

/* Length and percentage values */
background-position-x: 64px;
background-position-x: 25%;
background-position-x: 5em;
background-position-x: 1cm;

/* Global values */
background-position-x: inherit;
background-position-x: initial;
background-position-x: revert;
background-position-x: revert-layer;
background-position-x: unset;
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be wrapped in a pseudo block and not a css block

And, also - we can shorten the syntax to:

background-position: value;

the values can actually be mentioned under the Parameters: section

background-repeat: no-repeat;
background-position-x: center;
}
``` No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output image needs to added into the media folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants