Applied Visual Design - Lock an Element to its Parent with Absolute Positioning

Tell us what’s happening:

Any solution for this code ?
This always fault.

// running tests
Your code should use the top CSS offset of 50 pixels on the #searchbar element.
Your code should use the right CSS offset of 50 pixels on the #searchbar element.

Your code so far

<style>
  #searchbar {
    position: absolute;
    top: 50px;
    right: 50px;


  }
  section {
    position: relative;
  }
</style>
<body>
  <h1>Welcome!</h1>
  <section>
    <form id="searchbar">
      <label for="search">Search:</label>
      <input type="search" id="search" name="search">
      <input type="submit" name="submit" value="Go!">
    </form>
  </section>
</body>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36

Challenge Information:

Applied Visual Design - Lock an Element to its Parent with Absolute Positioning

Welcome to the community @mustafa20230100110!

As a hint, I will say that the properties to work with in the #searchbar are the following properties.

position:  value;
top: value;
right: value;

The values are provided within the instructions.

I hope this helps you!

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.