Jump to content

How to move extra links of navigation to the next line

Recommended Posts

Site URL: https://springtail-dove-9atf.squarespace.com/enroll

Hi, while my code is good with desktop, I need help for mobile because its width is overflowing (see screenshot). Would like the links "Customer Login" and "Contact" to move to the next line.

Below is the CSS code I used for desktop:

@media @desktop{
.nav{
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 25px;
  	color: @darkorange;
 	text-transform: uppercase;
 	letter-spacing: 1px;
 	display: flex;
 	justify-content: center;
}
.nav li{
    display: inline-block;
    position: relative;
    padding: 0 50px;
  text-align: center;
}
.nav li::after {
    position: absolute;
    width: 2px;
    right: 0;
    content: ' ';
    height: 100%;
    background: @darkorange;
}
.nav li:last-child::after {
   width: 0;
} 
  }

and code block with HTML:

<ul class="nav">
    <li><a href="/enroll">Enroll</a></li>
  <li><a  href="/enroll#faqs">FAQS</a></li> 
    <li><a  href="/customer-area">Customer Login</a></li>
  <li><a  href="/contact">Contact</a></li>
</ul>

 

Thank you!

Screen Shot 2021-08-25 at 1.25.05 PM.png

Link to comment
  • Replies 1
  • Views 307
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.