Treehouse: Grow your CSS skills. Land your dream job.

wp menu

  • # August 15, 2012 at 5:26 pm


    I am battling with a wp-menu.
    How can I keep the menu, with the sub-menu items inside my content div?
    And how can I style my sub-menu items with bullets or dashes?

    Hope you can help.


    # August 15, 2012 at 7:49 pm

    You need to keep an eye on your content models. When you float an element across, its containing block element effectively ignores that child’s height when calculating its own height (or width). This is something you are depending on with your header (which overflows horizontally).

    Personally, I don’t understand why you are floating your sidebar across. Do you really want content to move under it if the content is longer vertically than the sidebar? Use a basic grid and decide either on % widths of your components, or on fixed sizes (responsive vs fixed layout). Chris has a good article in his blogroll on exactly that topic at the moment.

    # August 17, 2012 at 1:48 pm

    Hi Ben
    Thanks for your reply.
    I am not sure if I understand you correctly.
    With sidebar, do you mean my menu?

    I am certain that you are right, I am trying to find the error, and fix it. But I am unsure about how that’s done.

    Basically I want a responsive layout where:
    header is 100% width.
    menu 25% width.
    image 25%width
    content 50%width.

    I based my theme on a combined starkers + 1140px grid, and I tried putting my content into the predefined column divs.


Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.