回答編集履歴
1
test
CHANGED
@@ -3,32 +3,6 @@
|
|
3
3
|
> .boxのrelativeを外せばサジェストの幅は適切になりますが、位置が直下に来てくれません
|
4
4
|
上記の状態のサイズが理想なのでしたら、.suggestにwidth: max-contentを設定することで実現できます。
|
5
5
|
```CSS
|
6
|
-
* {
|
7
|
-
margin: 0;
|
8
|
-
padding: 0;
|
9
|
-
list-style: none;
|
10
|
-
}
|
11
|
-
span {
|
12
|
-
margin: 2px;
|
13
|
-
display: inline-block;
|
14
|
-
}
|
15
|
-
.color_salmon {
|
16
|
-
background: salmon;
|
17
|
-
}
|
18
|
-
.color_pink {
|
19
|
-
background: pink;
|
20
|
-
}
|
21
|
-
.boxes {
|
22
|
-
display: flex;
|
23
|
-
}
|
24
|
-
.box {
|
25
|
-
margin-right: 10px;
|
26
|
-
position: relative;
|
27
|
-
}
|
28
|
-
.input{
|
29
|
-
width: 100px;
|
30
|
-
line-height: 1.5;
|
31
|
-
}
|
32
6
|
.suggest{
|
33
7
|
position: absolute;
|
34
8
|
top: calc(1em * 1.5);
|