CSS display element in one line with nowrap

kicaj picture kicaj · Oct 4, 2013 · Viewed 19.3k times · Source

I now width of my div, but i don't know height of my childrens button and ins tag. The ins tag has nowrap.

I would like display button in one line with ins tag.

div {
    border: 1px solid red;
    width: 150px;
    overflow: hidden;
}

button {
}

ins {
    white-space: nowrap;
}

There is my code, but now is ins below button: http://jsfiddle.net/ZZrJM/
I can't use height of div.

How display button and ins in one line?

Answer

chopper picture chopper · Oct 4, 2013

Move the white-space:nowrap from ins to div. See this jsFiddle

div {
    border: 1px solid red;
    width: 150px;
    overflow: hidden;
     white-space: nowrap;
}