sanity
sanity

Reputation: 35782

How do I prevent a JQuery UI menu from floating?

I'm trying to get a JQuery menu to appear on a line of its own on this page: http://www.lastcalc.com/help

You can see the menu at the top with two entries, "Getting Started" and "Variables and Functions". The problem is that while I want the following text to appear below this menu, it insists on appearing to the right of it!

If I forcefully set float: none; in the UL element css, then the menu doesn't render properly.

How can I get this to behave the way I want it to?

Upvotes: 0

Views: 348

Answers (2)

shaunsantacruz
shaunsantacruz

Reputation: 8930

This should do it:

  ul#menu {
      float: left;
  }
  div.section {
      clear: left;
  }

Elements after the floating element will flow around it. To avoid this, use the clear property. The clear property specifies which sides of an element other floating elements are not allowed.

Upvotes: 0

Shadow_boi
Shadow_boi

Reputation: 2198

add

clear: both;

to .section{}

Upvotes: 1

Related Questions