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

Problem In drop down problem and CSS3 animation

  • # March 21, 2013 at 12:55 pm

    In my wp based website I have a dropdown menu ,the sub menu inherit all the properties from root menu . If a submenu item has larger text it splits into two line . Like under services menu the submenu software development is splited in two line



    I want to fit it one line like “software development”

    Problem 2:

    I have css3 animated slider . currently it has 4 slides . The slides isn’t moving in circle . like If the 1st 2nd 3rd and 4th menu moved the , then it starts again from 1st , but I want to make it like circle 4th will be come after 1st . Here is my CSS

    .home-loop .post-list {
    width: 9999px;

    overflow: hidden;
    -webkit-animation-name: move;
    -webkit-animation-duration: 4s;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-direction: right;
    -webkit-animation-timing-function: linear;

    .home-loop .post-list:hover {
    -webkit-animation-play-state: paused;

    @-webkit-keyframes move {
    0% {
    margin-left: -100px;

    100% {
    margin-left: 800px;

    Here is my working site :

    thanks in advance

    # March 21, 2013 at 1:17 pm

    The width of the anchor links is being affected by your selector here

    ul#mainmenu-menu a

    It’s automatically adding 20px of horizontal padding to ALL anchor links.

    You might be able to tweak it by targeting the **sub-menu** links with

    .sub-menu > li > a


    # March 21, 2013 at 2:42 pm

    @Paulie_D: Here is my code for sub menu

    ul#mainmenu-menu li:hover ul.sub-menu {
    display: block;

    ul#mainmenu-menu ul.sub-menu > li {
    border: none;
    display: block;
    float: none;
    font-weight: normal;

    ul#mainmenu-menu ul.sub-menu > li > a {
    height: auto;

    line-height: 10px;

    but it doesn’t work :(

    # March 21, 2013 at 3:35 pm

    But does it do **anything**?

    # March 21, 2013 at 3:48 pm

    no :(

    # March 21, 2013 at 3:50 pm

    Hmmm….must be a specificity issue.

    # March 21, 2013 at 3:58 pm

    is it occur due to wp nav menu ? @Paulie_D

    # March 21, 2013 at 4:05 pm

    I doubt it….

    It’s more likely that the original styling in

    ul#mainmenu-menu a

    has a higher specificity (strength) than later selectors.

    # March 21, 2013 at 4:18 pm

    hmm :(

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

You must be logged in to reply to this topic.