Move a Relatively Positioned Element with CSS Offsets! Help

Move a Relatively Positioned Element with CSS Offsets! Help
0

#1

Tell us what’s happening:

Your code so far


<head>
<style>
  h2 {
    position: relative;
    top: 10px;
    right: 15px;
  }
</style>
</head>
<body>
  <h1>On Being Well-Positioned</h1>
  <h2>Move me!</h2>
  <p>I still think the h2 is where it normally sits.</p>
</body>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-visual-design/move-a-relatively-positioned-element-with-css-offsets/


#2


#3

I’ll give you a few clues

  1. From the challenge

As you saw in the last challenge, using the top offset moved the h2 downwards. Likewise, using a left offset moves an item to the right.

  1. Your styles moved the h2 down and left so maybe try using the opposite styles to move up and right.