Grow your CSS skills. Land your dream job.

Can’t seem to solve this problem

  • # June 28, 2013 at 5:56 am

    Hey guys,
    I’ve been working on a website and i have a problem i can’t seem to fix.

    http://www.mikevdb.nl

    On the right side at products you see a list of product, but i want those to be next to each other, so to speak. So two next to each other instead of just one.

    This is the code i use for the css:

    #producten a{
    text-decoration:none;
    color:white;
    width:158px;
    height:35px;
    font-size: 13px;
    font-family: arial;
    line-height:35px;
    padding-left:10px;
    box-sizing:border-box;
    background-image:url(images/productkopjes.png);
    background-repeat:no-repeat;
    display:block;
    float: left;
    margin-bottom: 2px;
    }

    Thanks :).

    # June 28, 2013 at 6:08 am

    Since these are wrapped in separate divs with a class of `news-item` you should float those.

    # June 28, 2013 at 6:35 am

    you should use this css

    `news-item{display:inline-block}`

    and it’ll work fine :-)

    # June 28, 2013 at 7:03 am

    Delete “clear:both” div in your html page

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".