Answers for "how to fixed the position of div"

CSS
1

fixed within the div css

#wrapper { width: 300px; background: orange; margin: 0 auto; position: relative; }
#feedback { position: fixed; right: 0; top: 120px; }

<div id="wrapper">
    ...
    <a id="feedback" href="#">Feedback</a>
</div>
Posted by: Guest on October-21-2020
1

html position div

<!DOCKTYPE html> <!-- Start of coding page -->
<html> <!-- Start of html coding -->
  <head> <!-- Start of head -->
    <title>TITLE<title> <!-- Title -->
    <script>
      //JavaScript
    </script>
    <style>
      /* CSS */
    </style>
  </head> <!-- End of head -->
  <body> <!-- Start of body -->
    <div id='mydiv' style = "position:relative; left:0px; top:100px;">
      Hello! 
      <!-- Use that style tag to positions things, have a play around with it! -->
    </div>
  </body> <!-- End of body -->
<html> <!-- End of html coding -->
<!-- Add this line of code next to your id: 

style = "position:relative; left:0px; top:100px;" 

too let you position divs where you want them, you can even position
them ontop of other divs! -->
Posted by: Guest on June-22-2020

Browse Popular Code Answers by Language