How do I keep two divs on the same line?

后端 未结 5 1928
梦谈多话
梦谈多话 2021-01-07 16:37

I\'ve been working on a dropdown menu similar to suckerfish. I\'ve got the dropdown side working now, but I have some images I\'m trying to put on either side of the links.

5条回答
  •  庸人自扰
    2021-01-07 17:13

    Simple do display: inline-block on both div's but be sure and set min-width and max-width both. Example below:

    div {
      max-width: 200px;
      min-width:200px;
      background:grey;
      display:inline-block;
      vertical-align: top;
    }

    test

    test

    test

    test

    test

    test

    test 2

    test 2

    test 2

提交回复
热议问题