Ian Gilligan Ian Gilligan - 1 year ago 62
CSS Question

Need to enforce edge of container on nav dropdown

So I'm a bit flummoxed about formatting this nav (Contact dropdown) to not overflow outside the container:


I'm sure it's because I've used position:relative a bit to move the nav around and make it stay inside the orange stripe. There'd be a lot of code to post in regard to what's going on with the nav as I'm just customizing a theme. Hoping someone can help me pinpoint what container I can target and what to code for forcing the "Contact" dropdown to come down flush against the website container, therefore showing a little below "Blog" as well rather than just busting out to the right. Help please!
Screenshot of .sub-menu popping out of container

Answer Source

I was able to achieve this by adding:

.sub-menu {
  right: 0;

Although doing so will apply this to each item with the .sub-menu class. If possible, add a new class name to that element to add the CSS above.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download