Bummer! You have been redirected as the page you requested could not be found.

Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Having an issue with cross browser NAV style

I have found that my Nav menu isn't looking the same in all browsers. It isn't the end of the world but, I find it rather annoying especially because in FireFox it is putting a single menu item on two lines rather than one. In all other browsers it looks as it should, one nice continuous line. I have been playing with it for a while now and, can't seem to find a solution. Firefox is doing weird things all around on my site but this particular one I would like to solve.

I am thinking of going from relative units to fixed but, as it works properly everyone else I'm not sure that will be the best solution. Any suggestions would be apprecitated.

The code below won't work on it's own, it's just so you can specifically see the navigation portion

nav {
    text-align: center;
    padding: 10px 0;
    margin: 20px 0 25px;
    font-size: 1.55em;
    background: #751935; /*burgandy*/
    box-shadow: 0px 3px 10px #000;
    }

nav ul {
    list-style: none;
    margin: 0 10px;
    padding: 0;
}

nav a, nav a:visited {
    color: white;
    }   

nav a.selected, nav a:hover {
    color: yellow;
    }   

nav li {
    padding: .15em;
    margin: .20em;
}

nav a {
    font-weight: 400;
    padding: 5px 30px;
}

@media screen and (min-width: 600px) {

        nav li {
            display: inline-block;    
            padding: .25em .25em;
            margin: .2em .1em;
        }

        nav a {
            padding: .8em .7em;
            margin: 0 -.15em;
        }

        nav {
            font-size: 1.3em;
        }

}

@media screen and (min-width: 700px) {

        nav {
            font-size: 1.4em;
        }
}
                <ul>
                    <li><a href="index.html" >Home</a></li>
                    <li><a href="adDesign.html">Ad Designs</a></li>
                    <li><a href="articleLayout.html" class="selected">Article Layouts</a></li>
                    <li><a href="miscWork.html">Miscellaneous Work</a></li>
                    <li><a href="about.html">About</a></li>
                    <li><a href="contact.html">Contact</a></li>
                </ul>
            </nav>

Do you have a live preview available. When I encounter cross browser problems, I often find the error by checking the browsers development tools and tinkering with the elements css property/values (within the tools) and then checking caniuse.com to make sure the property in question has no known issues with that browser.

1 Answer

That worked, I don't know why I didn't think of that as I did that constantly in Chrome. Didn't realize I could do that in any browser but, I found the problem in just a couple clicks.