0

I have a Nice CSS3 menu that works great however I am also incorporating a 1140px Grid System. The 1140px system has a class that looks like so:

.row {
 width: 100%;
 max-width: 1140px;
 min-width: 755px;
 margin: 0 auto;
 overflow: hidden;
}

The overflow: hidden; is preventing the menu drop down on the menu from working correctly. Here is the HTML of the menu:

<div class="row">
<div class="twelvecol logo">
<h1><a href="/">Logo</a></h1>

   <div id="navigation">
    <ul>
    <li><a href="#">Home</a></li>

    <li>
        <a href="#">2012</a>

        <ul>
            <li><a href="#">January</a></li>

            <li><a href="#">February</a></li>

            <li><a href="#">March</a></li>

            <li><a href="#">April</a></li>

            <li><a href="#">May</a></li>

            <li><a href="#">June</a></li>

            <li><a href="#">July</a></li>

            <li><a href="#">August</a></li>

            <li><a href="#">September</a></li>

             <li><a href="#">October</a></li>
        </ul>
    </li>
  <!-- MORE CODE --> 

I have attempted to override the overflow property by adding overflow: visible !important; but that breaks the page completely.

Can anyone help with a solution that will resolve the issue and show the menu properly without having to remove the 1140px Grid System?

Here is a jsFiddle I created.

Note: I do not mind using a solution that uses jQuery if that is what works.

4 Answers 4

2

Adding the following to the CSS solves the problem

#navigation ul
{
    position: absolute;
left: 500px;
min-width: 300px;
}

WORKING DEMO

Sign up to request clarification or add additional context in comments.

Comments

1
#navigation ul{
  position:absolute;
 right:0;
}
#navigation li ul{
 width:110px;
 }

Comments

0

Try to add a new class at your container:

<div class="row notoverflow">

in your css:

.row.notoverflow{overflow:auto}

and at the end of your container

<div class="row notoverflow">. . .
    <div style="clear:both"></div>
</div>

Without the overflow:hidden property, the container height wouldn't increase with his content ... The other way to do that is to clear the floats.

2 Comments

That does not work. That causes scroll bars to appear when the menu is hovered over.
I gave you an alternative way to the overflow:hidden in your .row ... The problem is in your menu ... he's pushing the content, you must give it a position:absolute
0

You could also remove the entire Nav div from within the containing div so that it comes first in the document flow....as in above

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.