Pls. how do i position the navbar to always be shown on the left side of the screen and always be visible to the user. Pls attach code. thanks

Tell us what’s happening:

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

<!DOCTYPE html>
<html lang="en">
<head>
  <link rel="stylesheet" href="styles.css">
  <title>Famous Scientists</title>
</head>
<body>
    <div class="nav">
  <nav id="navbar">
    <header><h1>Famous Scientists</h1></header>

   
          <a class="nav-link" href="#Marie_Curie">Marie Curie</a>
          <a class="nav-link" href="#Thomas_Edison">Thomas Edison</a>
          <a class="nav-link" href="#Micheal_Faraday">Micheal Faraday</a>
<a
class="nav-link" href="#Niels_Bohr">Niels Bohr</a>

  <a
class="nav-link" href="#Albert_Einstein">Albert Einstein</a>      
        

  </nav>
  </div>
<main id="main-doc">
  <section class="main-section" id="Marie_Curie">
    <header><h1>Marie Curie</h1></header>
    <ul>
      <li>born November 7, 1867</li>
      <li>Died July 4, 1934,</li>
    </ul>
    <p>Polish-born French physicist, famous for her work on radioactivity and twice a winner of the Nobel Prize. With Henri Becquerel and her husband, Pierre Curie, she was awarded the 1903 Nobel Prize for Physics. She was the sole winner of the 1911 Nobel Prize for Chemistry. She was the first woman to win a Nobel Prize, and she is the only woman to win the award in two different fields.</p>
     <p>Throughout World War I, Marie Curie, with the help of her daughter Irène, devoted herself to the development of the use of X-radiography. In 1918 the Radium Institute, the staff of which Irène had joined, began to operate in earnest, and it was to become a universal centre for nuclear physics and chemistry. Marie Curie, now at the highest point of her fame and, from 1922, a member of the Academy of Medicine, devoted her researches to the study of the chemistry of radioactive substances and the medical applications of these substances.</p>
     <code></code>
    </section>
    <section class="main-section" id="Thomas_Edison">
      <header><h1>Thomas Edison</h1></header>
      <ul>
      <li>Born February 11, 1847 </li>
      <li>Died October 18, 1931</li>
    </ul>
       <p>Thomas Alva Edison (February 11, 1847 – October 18, 1931) was an American inventor and businessman.[1][2][3] He developed many devices in fields such as electric power generation, mass communication, sound recording, and motion pictures.[4] These inventions, which include the phonograph, the motion picture camera, and early versions of the electric light bulb, have had a widespread impact on the modern industrialized world.[5] He was one of the first inventors to apply the principles of organized science and teamwork to the process of invention, working with many researchers and employees. He established the first industrial research laboratory.[6]</p>
     <p>Edison was raised in the American Midwest. Early in his career he worked as a telegraph operator, which inspired some of his earliest inventions.[4] In 1876, he established his first laboratory facility in Menlo Park, New Jersey, where many of his early inventions were developed. He later established a botanical laboratory in Fort Myers, Florida, in collaboration with businessmen Henry Ford and Harvey S. Firestone, and a laboratory in West Orange, New Jersey, that featured the world's first film studio, the Black Maria. With 1,093 US patents in his name, as well as patents in other countries, Edison is regarded as the most prolific inventor in American history.[7] Edison married twice and fathered six children. He died in 1931 of complications of diabetes. </p>

      <code></code> 
    </section>
    
    <section class="main-section" id="Micheal_Faraday">
      <header><h1>Micheal Faraday</h1></header>
      <ul>
      <li>born September 22, 1791</li>
      <li>August 25, 1867</li>
    </ul>
       <p>Michael Faraday, (born September 22, 1791, Newington, Surrey, England—died August 25, 1867, Hampton Court, Surrey), English physicist and chemist whose many experiments contributed greatly to the understanding of electromagnetism.</p>
     <p>Faraday, who became one of the greatest scientists of the 19th century, began his career as a chemist. He wrote a manual of practical chemistry that reveals his mastery of the technical aspects of his art, discovered a number of new organic compounds, among them benzene, and was the first to liquefy a “permanent” gas (i.e., one that was believed to be incapable of liquefaction). His major contribution, however, was in the field of electricity and magnetism. </p>
      <code></code>
      
    </section>
    <section class="main-section" id="Niels_Bohr">
      <header><h1>Niels Bohr</h1></header>
      <ul>
      <li>Born 7 October 1885</li>
      <li>Died 18 November 1962</li>
    </ul>
     <p>Niels Henrik David Bohr (Danish: [ˈne̝ls ˈpoɐ̯ˀ]; 
        was a Danish physicist who made foundational contributions to understanding atomic structure and quantum theory, for which he received the Nobel Prize in Physics in 1922. Bohr was also a philosopher and a promoter of scientific research. </p>
     <p>Bohr developed the Bohr model of the atom, in which he proposed that energy levels of electrons are discrete and that the electrons revolve in stable orbits around the atomic nucleus but can jump from one energy level (or orbit) to another. Although the Bohr model has been supplanted by other models, its underlying principles remain valid. He conceived the principle of complementarity: that items could be separately analysed in terms of contradictory properties, like behaving as a wave or a stream of particles. The notion of complementarity dominated Bohr's thinking in both science and philosophy. </p>
    <code></code> 
     </section>  
    <section class="main-section" id="Albert_Einstein">
      <header><h1>Albert Einstein</h1></header>
      <ul>
      <li>Born 14 March 1879</li>
      <li>18 April 1955</li>
    </ul>
       <p>He is widely acknowledged to be one of the greatest and most influential physicists of all time. Einstein is best known for developing the theory of relativity, but he also made important contributions to the development of the theory of quantum mechanics. Relativity and quantum mechanics are the two pillars of modern physics.[3][8] His mass–energy equivalence formula E = mc2, which arises from relativity theory, has been dubbed "the world's most famous equation".[9] His work is also known for its influence on the philosophy of science.[10][11] He received the 1921 Nobel Prize in Physics "for his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect",[12] a pivotal step in the development of quantum theory. His intellectual achievements and originality resulted in "Einstein" becoming synonymous with "genius".[13]</p>
     <p>In 1905, a year sometimes described as his annus mirabilis ('miracle year'), Einstein published four groundbreaking papers.[14] These outlined the theory of the photoelectric effect, explained Brownian motion, introduced special relativity, and demonstrated mass-energy equivalence. Einstein thought that the laws of classical mechanics could no longer be reconciled with those of the electromagnetic field, which led him to develop his special theory of relativity. He then extended the theory to gravitational fields; he published a paper on general relativity in 1916, introducing his theory of gravitation. In 1917, he applied the general theory of relativity to model the structure of the universe.[15][16] He continued to deal with problems of statistical mechanics and quantum theory, which led to his explanations of particle theory and the motion of molecules. He also investigated the thermal properties of light and the quantum theory of radiation, which laid the foundation of the photon theory of light. </p>
     <code></code>  
    </section>
  </main>
</body>

 
  </html>


body {
  background-color: #99CCFF;
}

.nav {
  display: flex;justify-content: left;
  background-color: beige
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

‘always visible to the user’ sounds like you need a sticky navbar to me
so maybe google up “sticky css property” and also use absolute positioning with left property set to 0

Change your .nav selector as follows :

mod edit: solution removed

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

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