hi I would like my navigation bar to be aligned with the content and not full-width.
See screenshot attached.

this is the test site: http://cubecom.space/newsite/

How do I change the CSS so it can work that way?
I'm using a Wordpress theme.

thanks!!

Recommended Answers

All 2 Replies

Your content is wrapped in a div with the class container and the logo and navigation is within a div with the class nav-bar.

The widest media query for the container is:

@media (min-width: 1200px) {
    .container {
        width: 1170px;
    }
}

To get the nav-bar aligned with the container is to add to the CSS block of nav-bar the following 2 declarations.

.nav-bar {
    max-width: 1170px;
    margin: 0 auto;
}

Thanks so much! Makes sense and it works:)

commented: Great! Glad it's sorted now. +7
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.