質問するログイン新規登録

回答編集履歴

2

文法修正

2017/06/06 05:13

投稿

LibertyBell3
LibertyBell3

スコア1084

answer CHANGED
@@ -7,6 +7,16 @@
7
7
  </dl>
8
8
  </div>
9
9
  ```
10
+ 修正版
11
+ ```HTML
12
+ <div id="box">
13
+ <dl>
14
+ <dt>2017-05-18 01:23:45</dt>
15
+ <dd>TextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextTextText</dd>
16
+ </dl>
17
+ </div>
18
+ ```
19
+
10
20
  ```CSS
11
21
  #box {
12
22
  width:1000px;/* 100%でも確認済み */
@@ -30,6 +40,7 @@
30
40
  }
31
41
  #box dl dd {
32
42
  flex-grow:1;
43
+ order:-1;/* 追記 */
33
44
  overflow:hidden;
34
45
  text-overflow:ellipsis;
35
46
  }

1

追記です

2017/06/06 05:13

投稿

LibertyBell3
LibertyBell3

スコア1084

answer CHANGED
@@ -9,7 +9,7 @@
9
9
  ```
10
10
  ```CSS
11
11
  #box {
12
- width:1000px;
12
+ width:1000px;/* 100%でも確認済み */
13
13
  }
14
14
  #box dl {
15
15
  display:flex;
@@ -23,7 +23,7 @@
23
23
  padding:5px;
24
24
  background-color:#dedede;
25
25
  border-right:1px solid #ccc;
26
- width:auto;
26
+ width:auto;/* この行はいらない */
27
27
  font-size:14px;
28
28
  font-weight:bold;
29
29
  white-space:nowrap;
@@ -35,4 +35,8 @@
35
35
  }
36
36
  ```
37
37
  `#box`の数値を変更しても同じように表示されたので、
38
- 多分大丈夫だと思います。
38
+ 多分大丈夫だと思います。
39
+
40
+ 追記:ソース内コメント部分を参照ください。
41
+ あと、このままだと、ボーダー分はみ出すかもしれないので、
42
+ `#box dl`に`box-sizing:border-box;`が必要かも。