Nav Bar Issue Please Help

I am looking for some help please, my wife has me build her business website tmtclinic.com . She is very meticulous as to how she wants the site to look thus the reason I built it. I have done my best to create a desktop version that she approves of. I finally have convinced her that her site should be responsive as many people now just use their phones thus her site doesn’t work that well when using a mobile device. My biggest problem is how to make the nav bar responsive so it would work on a phone. I know this is backwards as to not starting with the mobile version first, I just could not convince her that when I started. I am self taught and I am stuck… lol . Any suggestions or where to look would be greatly appreciated.

<div class="wrapper">
   <div class="logo">
   		<img src="images/tmtlogo.png" alt="TMT Logo">
   	 			</div>		
   <div class="container">
   
				<div class="grid-8-columns">
   				
   			<div class="yelbox">
   			  </div>
   			<div class="massage">
   			  </div>
   			<div class="yelbox">
   			  </div>
   			<div class="physio">
   			  </div>
   			<div class="yelbox">
   			  </div>
   			<div class="acupuncture">
   			  </div>
   			<div class="yelbox">
   			  </div>
   			<div class="contact">
   			  </div>
   			<div class="yelbox">
   			  </div>
<!--This is blank space to help align navbar word links-->
   				<div> </div>
   
   				<div> <a href="massage.html">Massage Therapy</a>
   				</div>
   			<div> <a href="about.html">About Us</a> 
   			  </div>
   			<div> <a href="physio.html">Physiotherapy</a>
   			  </div>
   			<div> <a href="facilities.html">Facilities</a>
   			  </div>
   			<div> <a href="acupuncture.html">Acupuncture</a>	
   			  </div>
   			<div> <a href="contact.html">Contact Us</a>
   			  </div>
   			<div> <a href="booking.html">Online Booking</a>
				  </div>
<!--This is last blank space below yellow box above nav bar-->	
   			<div>	</div>
   			</div>

CSS
/* CSS Document */

html { background-color: #6E8C8D; } 
body {
    min-height: 100vh;
    max-width: 1440px;
    /*background-color: papayawhip;*/ 
    margin: 0 auto;
}
.body{
   font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 100%;
	background-color: #6E8C8D;
/*	margin: 0px;*/
	padding: 0px;
	margin: 0px;

	/*margin:auto;
	/*display: flex;
	justify-content: center;*/
	/*padding: 20px 40px 50px 40px;
	font-family: Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif"active;
	background-color :#6F8C8F; 	
	/*max-width:1430;*/
	}
.wrapper{
   /* width: 1430px;*/
    height: 732px;
    background-image: url("images/bgheader.png");
	background-repeat: no-repeat;
	}
.logo{	
	/*display: block;*/
	display: flex;
justify-content: center;
	padding-bottom: 20px;
	}
.container{
	position:relative;
  	width: 1430px;		
	}
/*This is the Grid for the nav bar pics and nav buttons*/
.grid-8-columns{	
	width: 1430px;
	display: grid;
    grid-template-columns: 149.2px  171px  149.2px  171px 149.2px  171px  149.2px 171px  149.2px; 
	grid-template-rows:171px 50px;
grid-gap: 0px;
	place-items:center;
	font-size: 22px;
	}
.grid-8-columns a{
	padding-top:10px;
	text-decoration: none;	
	color: #f7eccc;	
	}
.grid-8-columns a:hover{
	background-color: #ddd;
	transition: background-color 0.5s;
	 color: white;
	}
.yelbox{
	height:171px;
	width:149.2px;
	background-image: url("images/yelbox.jpg")
	}
.massage{
	height:171px;
	width:171px;
	background-image: url("images/massage.jpg")
	}
.physio{
	height: 171px;
	width:171px;
	background-image: url("images/physio.jpg")
	}
.acupuncture{
	height: 171px;
	width:171px;
	background-image: url("images/acu.jpg")
	}
.contact{
	height: 171px;
	width:171px;
	background-image: url("images/contact.jpg")
	}
/*This is the reception picture*/
.reception-image{
		display: flex;
justify-content: center;
	}

Thank you

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Can you describe (or show us a drawing or rendering) of what you are attempting to do to the navbar?

Thank you so much for your help. I have attached a mockup jpeg of the mobile version that my wife would like. Is it possible to use an adaptive site approach and have the mobile version load when it screen size gets to < 480px. I’m open to all suggestions… Thank you

Thank you so much for your help

given how you’ve used fixed sizings for everything so far, I think you are going to have to essentially create a different version for the smaller screens.
Normally we try to write code that is “responsive” by avoiding using hardcoded pixel widths/heights and layouts but I don’t know if you want to redo the whole site like this. It may end up being about as much work.

On the other hand, even if you create a custom site layout for the mobile screen, it may run into problems on screens that are slightly bigger (for eg a tablet).

Just some initial thoughts.
To go ahead with creating new rules for the site on small screens, you should use a media query. Are you familiar with those? Essentially it is a rule that can encompasses other css property blocks inside that would only apply on certain conditions

Hi Hanna Thanks for the support. will a media query work to switch to a small webpage or do u have to use a jquery? I will also look at the link that you gave me. You are the best. Thank you thank you thank you :pray: :grinning: :heart:

Im not sure if I asked my question right… will a media query allow me to switch to a totally separate webpage(mobile version) with all different html code to fit the mobile version?

A media query allows you to switch out the css rules for the same html site.
This is the standard way to deal with multiple screen types (you keep the html as is, and switch out the css)

1 Like

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