How do i change the color of my navbar that has a fixed position?

Course Queries Syllabus Queries 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I've been trying to add "background-color" but that just leaves a big empty gap in between the header img and header nav due to the position.Without the position, the header nav wouldn't be where i want it to be (towards the right)
(I can't use any bootstrap or whatever because its not in my syllabus and im just starting out to code)

This is my code:

 

header {
  margin-top: ref="https://forum.tuteehub.com/tag/auto">auto;
  height: 79px;
  overflow: hidden;
}

header img {
  ref="https://forum.tuteehub.com/tag/float">float: ref="https://forum.tuteehub.com/tag/left">left;
  position: fixed;
  z-index: 2;
  top: 0;
}

header nav {
  ref="https://forum.tuteehub.com/tag/float">float: right;
  position: fixed;
  z-index: 2;
  top: 0;
  height: 79px;
  ref="https://forum.tuteehub.com/tag/left">left: 542px;
}
r>
   href="index.html"> src="images/greylogo.png" alt="E R I" />
  
r>

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.