Streaming live at 10am (PST)

CSS to hide one nav bar and display another on specific media queries


I’ve got the annoying problem of a landscape tablet using my desktop nav bar. Because I need the dropdowns to work on hover on desktop and then on click on touch screens I need to switch the nav bar on the tablet desktop view.

For all my other media sizes, I’ve done this simply in the visual editor, but I need to use css code to do this for tablet landscape. I found this post, so I’ve used this as a starting point…

Here’s what I’ve tired that isn’t working:

@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : landscape) {
.navbar-2 {
display: none;
.navbar-2.tablet {
Display: flex;

Does anyone have any ideas of what I’m doing wrong?

Thank you!

It is helpful to provide a link and access to your staging URL for inspection via browser dev tools.

Hi Jeff,

I left the link at the bottom, is that not the right thing? Excuse me if I’m being daft!

The staging URL would be the one you use to preview your site in a browser, not the designer. Yours is currently password protected.

Ah right, thanks. I’ve taken the password off

Hi Jeff,
Now that I’ve shared the staging URL, do you have any advice or thoughts?

Grateful for your time!