Форум программистов, компьютерный форум, киберфорум
HTML, CSS
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.60/5: Рейтинг темы: голосов - 5, средняя оценка - 4.60
 Аватар для oobarbazanoo
7 / 30 / 9
Регистрация: 13.05.2015
Сообщений: 1,835

Растяжение div

31.01.2017, 17:00. Показов 1172. Ответов 5
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Имеется div отец. У него двое детей.
У одного ребёнка фиксированная ширина, и он стоит справа, а второй ребёнок должен занимать всё оставшееся место в отце слева.
Не получается реализовать. Подскажите, пожалуйста.
0
Лучшие ответы (1)
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
31.01.2017, 17:00
Ответы с готовыми решениями:

Растяжение div'a
У меня такая задача: фиксировать высоту div'a, но сделать его устойчивым к растяжению. display: table-cell IE6,IE7 не поддерживает, можно...

растяжение div по заполнению.
Доброго времени суток. Подскажите, пожалуйста, как сделать растяжение дива по заполнению в нем текста. Т.е. имеем блок div с фоновым...

CSS!? Div в div'e, как не потерять позиции css внутреннего div'a при изменении размера браузера?
вот когда изменяю размер браузера, то внутренний div не хочет изменяться вместе с контейнером, а контейнер изменяется? .container{ ...

5
Эксперт HTML/CSS
 Аватар для Fedor92
2964 / 2621 / 1068
Регистрация: 15.12.2012
Сообщений: 10,091
Записей в блоге: 11
31.01.2017, 17:13
oobarbazanoo, самый простой способ:
HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
    html, body{width: 100%; height: 100%; margin:0}
    .parent{
        width: 100%;
        height: 100%;
        display:table
    }
    .child, .child_fix{
        display:table-cell;
    }
    .child{
        background: blue
    }
    .child_fix{
        width: 300px;
        background: red
    }
    </style>
</head>
<body>
    <div class="parent">
        <div class="child_fix"></div>
        <div class="child"></div>
    </div>
</body>
</html>
А вообще перед созданием тем, пользуйтесь поиском...
1
34 / 34 / 14
Регистрация: 10.06.2015
Сообщений: 57
31.01.2017, 17:15
Лучший ответ Сообщение было отмечено oobarbazanoo как решение

Решение

Вот все варианты реализации с описание минусов каждой http://xandeadx.ru/blog/css/895
Правда там рассматривается фиксированный элемент слева, но это уже нюансы...
1
 Аватар для oobarbazanoo
7 / 30 / 9
Регистрация: 13.05.2015
Сообщений: 1,835
31.01.2017, 18:18  [ТС]
web-tech, первый вариант по ссылке почему то не работает.

CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
@CHARSET "UTF-8";
body
{background-image: url(tomato.jpg);}
 
.backInvisibleFillWidth
{
    margin-top: 5%;
    width:  100%;
}
 
.fixBottom::after
{
    visibility: hidden;
    display: block;
    content: "";
    height: 0;
    clear:  both;
}
 
.backCoveredHouseTwoMainColumns
{
    width: 100%;
    margin: auto;
    max-width: 1100px;
    /*min-width: 988px;*/
}
 
.backInvisibleHouseCommoditiesInfo
{
    width:  60%;
    display: inline-block;
}
 
.backInvisibleHouseCommodityList
{
    width:  30%;
    float:  right;
}
 
.backVisibleStandardColor
{
    background: linear-gradient(rgba(255, 0, 0, .5), rgba(253, 241, 77, .5));
}
 
.backVisibleTextAreaAndAddButt
{
    display: inline-block;
    width:50%;
    min-width:685px;
 
    padding: 0;
    border-radius:15px 45px;
    border: 2px solid #000000;
}
 
/*.backTextAreaAndAddButt:hover
{
    border: 2px solid #ffffff;
}*/
 
.button
{
    color: #441a66;
    display: inline-block;
    background-color: #c0c0c0;
    cursor: pointer;
    position: relative;
    transition: all 1s  cubic-bezier(.17,.67,.04,1);
}
 
.button:before
{
    opacity: 0;
    content: attr(data-tooltip);
    white-space: nowrap;
    position: absolute;
    bottom: 0;
 
    left: 50%;
    transform: translateX(-50%);
 
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 5px;
    border-radius: 45px;
    border: 1px dashed #000000;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    padding: 5px;
    padding-top: 0;
    padding-bottom: 0;
 
 
    background: linear-gradient( rgba(133, 9, 183, .8), rgba(147, 51, 191, .8));
    transition:all 1s linear;
}
 
.button[data-tooltip]:not([data-tooltip=""]):hover:before
{
    opacity: 1;
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 20px;
    border-radius: 45px;
    border: 1px dashed #000000;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    padding: 5px;
    padding-top: 0;
    padding-bottom: 0;
}
 
.addNewProductButt
{
    text-align: center;
    vertical-align: middle;
    color: #000000;
    padding:10px;
    margin:10px;
    margin-left:0;
    box-sizing: border-box;
    width:122px;
    float:right;
    border-radius:15px 50px;
    border: 3px solid #000000;
    font-weight: bold;
    font-family: "Comic Sans MS";
    font-size: inherit;
    background: linear-gradient(to right, red, yellow);
}
 
.addNewProductButt:hover
{
    border: 3px solid #ffffff;
    background: linear-gradient(to right, yellow, red);
    color: white;
}
 
.productNameInput
{
    display: block;
    background-color: #dffdfd;
    text-align: center;
    vertical-align: middle;
    padding:10px;
    margin:10px;
    margin-right:122px;
    margin-top:12px;
    border-radius:15px 50px;
    border: 2px solid #000000;
}
 
.productNameInput:focus
{
    border: 3px solid #ffffff;
    outline: none;
}
 
.backProductInfo
{
    display: inline-block;
    width:50%;
    min-width:685px;
    border-radius:15px 50px;
    border: 2px solid #000000;
}
 
.backProductInfo:hover
{
    position: relative;
    bottom: 10px;
}
 
/*.backProductInfo:hover
{
    border: 2px solid #ffffff;
}*/
 
.textInProdInfo
{
    display: inline-block;
    min-width: 80px;
    max-width: 80px;
    padding: 15px;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 20px;
    opacity: 1;
    text-shadow: -2px 0 white, 0 2px white, 2px 0 white, 0 -2px white;
}
 
.addProdButt
{
    text-align: center;
    vertical-align: middle;
    border: 2px solid #000000;
    padding-left: 10px;
    padding-right: 10px;
    border-radius:50%;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    background-color: #1adb0f;
    color: #000000;
}
 
.addProdButt:hover
{
    border: 2px solid #ffffff;
    color: #ffffff;
}
 
.subtractProdButt
{
    text-align: center;
    vertical-align: middle;
    border: 2px solid #000000;
    padding-left: 10px;
    padding-right: 10px;
    border-radius:50%;
    margin-left:20%;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    background-color: #ff0000;
    color: #000000;
}
 
.subtractProdButt:hover
{
    border: 2px solid #ffffff;
    color: #ffffff;
}
 
.prodQuantityInfo
{
    display:inline-block;
    background-color:#dffdfd;
    text-align: center;
    vertical-align: middle;
    padding:5px;
    padding-right: 10px;
    padding-left: 10px;
    border-radius:15px 50px;
    border: 2px solid #000000;
    width:5%;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 20px;
}
 
.boughtButt
{
    text-align: center;
    vertical-align: middle;
    color: #000000;
    padding:10px;
    margin:10px;
    margin-right:0;
    margin-left:15%;
    width:14%;
    border-radius:15px 50px;
    border: 3px solid #000000;
    font-weight: bold;
    font-family: "Comic Sans MS";
    font-size: inherit;
    background: linear-gradient(to right, red, yellow);
}
 
.boughtButt:hover
{
    border: 3px solid #ffffff;
    background: linear-gradient(to right, yellow, red);
    color: white;
}
 
.deleteButt
{
    text-align: center;
    vertical-align: middle;
    border: 2px solid #000000;
    padding-left: 10px;
    padding-right: 10px;
    border-radius:50%;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    background-color: #ff0000;
    color: #000000;
}
 
.deleteButt:hover
{
    border: 2px solid #ffffff;
    color: white;
}
 
.toBuyLabel
{
    text-align: center;
    vertical-align: middle;
    display: block;
    width:25%;
    min-width:330px;
    max-width:330px;
    padding: 0;
    border-radius:15px 45px;
    border: 2px solid #000000;
    padding-top: 10px;
    padding-bottom: 10px;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    text-shadow: -2px 0 white, 0 2px white, 2px 0 white, 0 -2px white;
}
 
.toBuyProducts
{
    display: inline-block;
    min-width:330px;
    max-width:330px;
    padding: 0px;
    border-radius:15px 45px;
    border: 2px solid #000000;
}
 
.good
{
    display:inline-block;
    padding:7px;
    border-radius:15px 45px;
    border: 2px solid #000000;
    margin: 5px;
    font-family: "Comic Sans MS";
    font-weight: bold;
    background-color: #dffdfd;
}
 
.numberOfGoods
{
    display:inline-block;
    border: 1px dotted #000000;
    margin-left: 5px;
    border-radius:15px 45px;
    padding: 7px;
}
 
.alreadyBoughtProd
{
    display: inline-block;
    min-width:330px;
    max-width:330px;
    padding: 0px;
    border-radius:15px 45px;
    border: 2px solid #000000;
    min-height: 100px;
}
 
.sticker
{
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    border-radius:15px 45px;
    position: fixed;
    bottom: -100px;
    background: #9333bf;
    display: inline-block;
    width: 200px;
    height: 150px;
    border: 2px solid #000000;
    text-align: center;
    vertical-align: middle;
    color: #ffffff;
    text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;
    background: linear-gradient( rgba(133, 9, 183, .5), rgba(147, 51, 191, .5));
    transition: all 3s  cubic-bezier(.17,.67,.04,1);
}
 
.sticker:after
{
    border-radius:15px 45px;
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient( rgba(255, 255, 0, .5), rgba(255, 138, 36, .5) );
    z-index: -1;
    transition: all 3s  cubic-bezier(.17,.67,.04,1);
    opacity:0;
}
 
.sticker:hover:after
{
    opacity: 1;
}
 
.sticker:hover
{
    bottom: 10px;
    transform: rotate(360deg);
    cursor: pointer;
}
 
.textInsideStickerBottom
{
    display: inline-block;
    font-weight: bold;
    font-size: 20px;
    margin-top: 40px;
}
 
@media  print
{
    .sticker
    {
        background: #ffffff;
        border: 3px solid #9333bf;
    }
 
    .textInsideStickerBottom
    {
        display: inline-block;
        margin-top: 0;
        margin-bottom: 50px;
        color: #000000;
    }
 
    .textInsideStickerTop
    {display: none;}
}
 
@media only screen and (max-width: 1000px)
{
    .backInvisibleHouseCommodityList
    {
        float: left;
        width:  100%;
        max-width: 685px;
        min-width: 515px;
    }
 
    .toBuyLabel
    {
        width: 100%;
        max-width: 685px;
        min-width: 515px;
    }
 
    .toBuyProducts
    {
        display: block;
        max-width: 685px;
        min-width: 515px;
    }
 
    .alreadyBoughtProd
    {
        display: block;
        max-width:685px;
        min-width: 515px;
    }
}
 
@media only screen and (max-width: 720px)
{
    .backInvisibleHouseCommoditiesInfo
    {
        display: block;
        width:  100%;
        max-width: 685px;
        min-width: 515px;
        border: 2px solid green;
    }
 
    .backProductInfo
    {
        display: block;
        width:100%;
        min-width: 515px;
    }
 
    .backVisibleTextAreaAndAddButt
    {
        display: block;
        width:100%;
        min-width: 515px;
    }
 
    /*.productNameInput*/
    /*{*/
        /*display: inline-block;*/
        /*padding:10px;*/
        /*margin:10px;*/
        /*width: auto;*/
        /*margin-right:170px;*/
        /*margin-top:12px;*/
        /*border-radius:15px 50px;*/
        /*border: 2px solid #000000;*/
        /*!*width: calc(100% - 170px);*!*/
    /*}*/
 
    /*.addNewProductButt*/
    /*{*/
        /*padding:10px;*/
        /*margin:10px;*/
        /*margin-left:0;*/
        /*box-sizing: border-box;*/
        /*width:122px;*/
        /*float:right;*/
    /*}*/
 
    /*.subtractProdButt*/
    /*{*/
        /*margin-left:5%;*/
    /*}*/
 
    .addProdButt
    {
        margin-right: 5%;
    }
 
    .boughtButt
    {
        margin-left:10%;
        box-sizing: border-box;
        width:122px;
    }
 
    .deleteButt
    {
 
    }
}

HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8"/>
    <title>Commodity shop</title>
    <link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
    <div class="backInvisibleFillWidth fixBottom">
        <div class="backCoveredHouseTwoMainColumns fixBottom">
            <!--left column-->
            <div class="backInvisibleHouseCommoditiesInfo">
                <div class="backVisibleTextAreaAndAddButt backVisibleStandardColor">
                    <div class="button addNewProductButt" data-tooltip="Create new">Add product</div>
                    <input class="productNameInput" type="text" placeholder="Name of the commodity" maxlength="15">
                </div>
 
                <div class="backProductInfo backVisibleStandardColor">
                    <span class="textInProdInfo">Tomatoes</span>
                    <div class="button subtractProdButt" data-tooltip="Take away">-</div>
                    <span class="prodQuantityInfo">1</span>
                    <!--<input  type="number" placeholder="1" maxlength="4" min="1" max="999">-->
                    <div class="button addProdButt" data-tooltip="Add">+</div>
                    <div class="button boughtButt" data-tooltip="Move to already bought">Bought</div>
                    <div class="button deleteButt" data-tooltip="Cancel">×</div>
                </div>
 
                <div class="backProductInfo backVisibleStandardColor">
                    <span class="textInProdInfo">Cookies</span>
                    <div class="button subtractProdButt" data-tooltip="Take away">-</div>
                    <span class="prodQuantityInfo">1</span>
                    <div class="button addProdButt" data-tooltip="Add">+</div>
                    <div class="button boughtButt" data-tooltip="Move to already bought">Bought</div>
                    <div class="button deleteButt" data-tooltip="Cancel">×</div>
                </div>
 
                <div class="backProductInfo backVisibleStandardColor">
                    <span class="textInProdInfo">Cheese</span>
                    <div class="button subtractProdButt" data-tooltip="Take away">-</div>
                    <span class="prodQuantityInfo">1</span>
                    <div class="button addProdButt" data-tooltip="Add">+</div>
                    <div class="button boughtButt" data-tooltip="Move to already bought">Bought</div>
                    <div class="button deleteButt" data-tooltip="Cancel">×</div>
                </div>
            </div>
            <!--right column-->
            <div class="backInvisibleHouseCommodityList">
                <div class="toBuyLabel backVisibleStandardColor">To buy</div>
 
                <div class="toBuyProducts backVisibleStandardColor">
                    <div class="good">Tomatoes<span class="numberOfGoods backVisibleStandardColor">1</span></div>
                    <div class="good">Cookies <span class="numberOfGoods backVisibleStandardColor">1</span></div>
                    <div class="good">Cheese  <span class="numberOfGoods backVisibleStandardColor">1</span></div>
                </div>
 
                <div class="toBuyLabel backVisibleStandardColor">Already bought</div>
 
                <div class="alreadyBoughtProd backVisibleStandardColor">
 
                </div>
            </div>
        </div>
    </div>
 
    <div class="sticker">
        <span class="textInsideStickerTop">Buy List</span>
        <span class="textInsideStickerBottom">Created by<br/>
        Trofimov Yaroslav</span>
    </div>
</body>
</html>
Добавлено через 53 секунды
HTML5
1
2
3
4
div class="backVisibleTextAreaAndAddButt backVisibleStandardColor">
                    <div class="button addNewProductButt" data-tooltip="Create new">Add product</div>
                    <input class="productNameInput" type="text" placeholder="Name of the commodity" maxlength="15">
                </div>
CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.addNewProductButt
{
    text-align: center;
    vertical-align: middle;
    color: #000000;
    padding:10px;
    margin:10px;
    margin-left:0;
    box-sizing: border-box;
    width:122px;
    float:right;
    border-radius:15px 50px;
    border: 3px solid #000000;
    font-weight: bold;
    font-family: "Comic Sans MS";
    font-size: inherit;
    background: linear-gradient(to right, red, yellow);
}
 
.productNameInput
{
    display: block;
    background-color: #dffdfd;
    text-align: center;
    vertical-align: middle;
    padding:10px;
    margin:10px;
    margin-right:122px;
    margin-top:12px;
    border-radius:15px 50px;
    border: 2px solid #000000;
}
0
34 / 34 / 14
Регистрация: 10.06.2015
Сообщений: 57
31.01.2017, 18:46
oobarbazanoo, https://jsfiddle.net/m23zx92m/ - что именно не работает?

HTML5
1
2
3
4
<div class="backVisibleTextAreaAndAddButt backVisibleStandardColor">
  <div class="button addNewProductButt" data-tooltip="Create new">Add product</div>
  <input class="productNameInput" type="text" placeholder="Name of the commodity" maxlength="15">
</div>
CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.addNewProductButt
{
    text-align: center;
    vertical-align: middle;
    color: #000000;
    padding:10px;
    margin:10px;
    margin-left:0;
    box-sizing: border-box;
    width:122px;
    float:right;
    border-radius:15px 50px;
    border: 3px solid #000000;
    font-weight: bold;
    font-family: "Comic Sans MS";
    font-size: inherit;
    background: linear-gradient(to right, red, yellow);
}
 
.productNameInput {
    display: block;
    background-color: #dffdfd;
    text-align: center;
    padding:10px;
    margin:10px;
    margin-right:122px;
    margin-top:12px;
    border-radius:15px 50px;
    border: 2px solid #000000;
}
1
 Аватар для oobarbazanoo
7 / 30 / 9
Регистрация: 13.05.2015
Сообщений: 1,835
31.01.2017, 19:23  [ТС]
web-tech, тут есть зелёная и красная зоны и они работают не корректно, а именно при сжимании откуда то появляется правый padding и образуется пустое место между border и сдвинутым вправо div.
HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8"/>
    <title>Commodity shop</title>
    <link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
    <div class="backInvisibleFillWidth fixBottom">
        <div class="backCoveredHouseTwoMainColumns fixBottom">
            <!--left column-->
            <div class="backInvisibleHouseCommoditiesInfo">
                <div class="backVisibleTextAreaAndAddButt backVisibleStandardColor">
                    <div class="button addNewProductButt" data-tooltip="Create new">Add product</div>
                    <input class="productNameInput" type="text" placeholder="Name of the commodity" maxlength="15">
                </div>
 
                <div class="backProductInfo backVisibleStandardColor">
 
                    <div class="left">
                        <!--<span class="textInProdInfo">Tomatoes</span>-->
                    </div>
 
                    <div class="right">
                        <!--<div class="button boughtButt" data-tooltip="Move to already bought">Bought</div>-->
                        <!--<div class="button deleteButt" data-tooltip="Cancel">×</div>-->
                    </div>
 
                    <div class="fluid">
                        <!--<div class="button subtractProdButt" data-tooltip="Take away">-</div>-->
                        <!--<span class="prodQuantityInfo">1</span>-->
                        <!--&lt;!&ndash;<input  type="number" placeholder="1" maxlength="4" min="1" max="999">&ndash;&gt;-->
                        <!--<div class="button addProdButt" data-tooltip="Add">+</div>-->
                    </div>
                </div>
 
                <div class="backProductInfo backVisibleStandardColor">
                    <span class="textInProdInfo">Cookies</span>
                    <div class="button subtractProdButt" data-tooltip="Take away">-</div>
                    <span class="prodQuantityInfo">1</span>
                    <div class="button addProdButt" data-tooltip="Add">+</div>
                    <div class="button boughtButt" data-tooltip="Move to already bought">Bought</div>
                    <div class="button deleteButt" data-tooltip="Cancel">×</div>
                </div>
 
                <div class="backProductInfo backVisibleStandardColor">
                    <span class="textInProdInfo">Cheese</span>
                    <div class="button subtractProdButt" data-tooltip="Take away">-</div>
                    <span class="prodQuantityInfo">1</span>
                    <div class="button addProdButt" data-tooltip="Add">+</div>
                    <div class="button boughtButt" data-tooltip="Move to already bought">Bought</div>
                    <div class="button deleteButt" data-tooltip="Cancel">×</div>
                </div>
            </div>
            <!--right column-->
            <div class="backInvisibleHouseCommodityList">
                <div class="toBuyLabel backVisibleStandardColor">To buy</div>
 
                <div class="toBuyProducts backVisibleStandardColor">
                    <div class="good">Tomatoes<span class="numberOfGoods backVisibleStandardColor">1</span></div>
                    <div class="good">Cookies <span class="numberOfGoods backVisibleStandardColor">1</span></div>
                    <div class="good">Cheese  <span class="numberOfGoods backVisibleStandardColor">1</span></div>
                </div>
 
                <div class="toBuyLabel backVisibleStandardColor">Already bought</div>
 
                <div class="alreadyBoughtProd backVisibleStandardColor">
 
                </div>
            </div>
        </div>
    </div>
 
    <div class="sticker">
        <span class="textInsideStickerTop">Buy List</span>
        <span class="textInsideStickerBottom">Created by<br/>
        Trofimov Yaroslav</span>
    </div>
</body>
</html>

CSS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
@CHARSET "UTF-8";
body
{background-image: url(tomato.jpg);}
 
.backInvisibleFillWidth
{
    margin-top: 5%;
    width:  100%;
}
 
.fixBottom::after
{
    visibility: hidden;
    display: block;
    content: "";
    height: 0;
    clear:  both;
}
 
.backCoveredHouseTwoMainColumns
{
    width: 100%;
    margin: auto;
    max-width: 1100px;
    /*min-width: 988px;*/
}
 
.backInvisibleHouseCommoditiesInfo
{
    width:  60%;
    display: inline-block;
}
 
.backInvisibleHouseCommodityList
{
    width:  30%;
    float:  right;
}
 
.backVisibleStandardColor
{
    background: linear-gradient(rgba(255, 0, 0, .5), rgba(253, 241, 77, .5));
}
 
.backVisibleTextAreaAndAddButt
{
    display: inline-block;
    width:50%;
    min-width:685px;
 
    padding: 0;
    border-radius:15px 45px;
    border: 2px solid #000000;
}
 
/*.backTextAreaAndAddButt:hover
{
    border: 2px solid #ffffff;
}*/
 
.button
{
    color: #441a66;
    display: inline-block;
    background-color: #c0c0c0;
    cursor: pointer;
    position: relative;
    transition: all 1s  cubic-bezier(.17,.67,.04,1);
}
 
.button:before
{
    opacity: 0;
    content: attr(data-tooltip);
    white-space: nowrap;
    position: absolute;
    bottom: 0;
 
    left: 50%;
    transform: translateX(-50%);
 
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 5px;
    border-radius: 45px;
    border: 1px dashed #000000;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    padding: 5px;
    padding-top: 0;
    padding-bottom: 0;
 
 
    background: linear-gradient( rgba(133, 9, 183, .8), rgba(147, 51, 191, .8));
    transition:all 1s linear;
}
 
.button[data-tooltip]:not([data-tooltip=""]):hover:before
{
    opacity: 1;
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 20px;
    border-radius: 45px;
    border: 1px dashed #000000;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
    padding: 5px;
    padding-top: 0;
    padding-bottom: 0;
}
 
.addNewProductButt
{
    text-align: center;
    vertical-align: middle;
    color: #000000;
    padding:10px;
    margin:10px;
    margin-left:0;
    box-sizing: border-box;
    width:122px;
    float:right;
    border-radius:15px 50px;
    border: 3px solid #000000;
    font-weight: bold;
    font-family: "Comic Sans MS";
    font-size: inherit;
    background: linear-gradient(to right, red, yellow);
}
 
.addNewProductButt:hover
{
    border: 3px solid #ffffff;
    background: linear-gradient(to right, yellow, red);
    color: white;
}
 
.productNameInput
{
    background-color: #dffdfd;
    text-align: center;
    vertical-align: middle;
    padding:10px;
    margin:10px;
    margin-right:0;
    margin-top:12px;
    border-radius:15px 50px;
    border: 2px solid #000000;
    width: calc(100% - 170px);
}
 
.productNameInput:focus
{
    border: 3px solid #ffffff;
    outline: none;
}
 
.backProductInfo
{
    display: inline-block;
    width:50%;
    min-width:685px;
    border-radius:15px 50px;
    border: 2px solid #000000;
}
 
.backProductInfo:hover
{
    position: relative;
    bottom: 10px;
}
 
/*.backProductInfo:hover
{
    border: 2px solid #ffffff;
}*/
 
.textInProdInfo
{
    display: inline-block;
    min-width: 80px;
    max-width: 80px;
    padding: 15px;
    padding-right: 0;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 20px;
    opacity: 1;
    text-shadow: -2px 0 white, 0 2px white, 2px 0 white, 0 -2px white;
}
 
.addProdButt
{
    text-align: center;
    vertical-align: middle;
    border: 2px solid #000000;
    padding-left: 10px;
    padding-right: 10px;
    margin-right:10%;
    border-radius:50%;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    background-color: #1adb0f;
    color: #000000;
}
 
.addProdButt:hover
{
    border: 2px solid #ffffff;
    color: #ffffff;
}
 
.subtractProdButt
{
    text-align: center;
    vertical-align: middle;
    border: 2px solid #000000;
    padding-left: 10px;
    padding-right: 10px;
    border-radius:50%;
    margin-left:20%;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    background-color: #ff0000;
    color: #000000;
}
 
.right
{
    float:right;
    height:40px;
    width:40px;
    background:green;
}
 
.left
{
    height:40px;
    width:40px;
    float:left;
    background:green;
}
 
.fluid
{
    overflow:hidden;
 
    height:40px;
    background:red;
}
 
 
.subtractProdButt:hover
{
    border: 2px solid #ffffff;
    color: #ffffff;
}
 
.prodQuantityInfo
{
    display:inline-block;
    background-color:#dffdfd;
    text-align: center;
    vertical-align: middle;
    padding:5px;
    padding-right: 10px;
    padding-left: 10px;
    border-radius:15px 50px;
    border: 2px solid #000000;
    width:5%;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 20px;
}
 
.boughtButt
{
    text-align: center;
    vertical-align: middle;
    color: #000000;
    padding:10px;
    margin:10px;
    margin-right:0;
    margin-left:7%;
    box-sizing: border-box;
    width:122px;
    border-radius:15px 50px;
    border: 3px solid #000000;
    font-weight: bold;
    font-family: "Comic Sans MS";
    font-size: inherit;
    background: linear-gradient(to right, red, yellow);
}
 
.boughtButt:hover
{
    border: 3px solid #ffffff;
    background: linear-gradient(to right, yellow, red);
    color: white;
}
 
.deleteButt
{
    margin: 0;
    text-align: center;
    vertical-align: middle;
    border: 2px solid #000000;
    padding-left: 10px;
    padding-right: 10px;
    border-radius:50%;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    background-color: #ff0000;
    color: #000000;
}
 
.deleteButt:hover
{
    border: 2px solid #ffffff;
    color: white;
}
 
.toBuyLabel
{
    text-align: center;
    vertical-align: middle;
    display: block;
    width:25%;
    min-width:330px;
    max-width:330px;
    padding: 0;
    border-radius:15px 45px;
    border: 2px solid #000000;
    padding-top: 10px;
    padding-bottom: 10px;
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    text-shadow: -2px 0 white, 0 2px white, 2px 0 white, 0 -2px white;
}
 
.toBuyProducts
{
    display: inline-block;
    min-width:330px;
    max-width:330px;
    padding: 0px;
    border-radius:15px 45px;
    border: 2px solid #000000;
}
 
.good
{
    display:inline-block;
    padding:7px;
    border-radius:15px 45px;
    border: 2px solid #000000;
    margin: 5px;
    font-family: "Comic Sans MS";
    font-weight: bold;
    background-color: #dffdfd;
}
 
.numberOfGoods
{
    display:inline-block;
    border: 1px dotted #000000;
    margin-left: 5px;
    border-radius:15px 45px;
    padding: 7px;
}
 
.alreadyBoughtProd
{
    display: inline-block;
    min-width:330px;
    max-width:330px;
    padding: 0px;
    border-radius:15px 45px;
    border: 2px solid #000000;
    min-height: 100px;
}
 
.sticker
{
    font-family: "Comic Sans MS";
    font-weight: bold;
    font-size: 30px;
    border-radius:15px 45px;
    position: fixed;
    bottom: -100px;
    background: #9333bf;
    display: inline-block;
    width: 200px;
    height: 150px;
    border: 2px solid #000000;
    text-align: center;
    vertical-align: middle;
    color: #ffffff;
    text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;
    background: linear-gradient( rgba(133, 9, 183, .5), rgba(147, 51, 191, .5));
    transition: all 3s  cubic-bezier(.17,.67,.04,1);
}
 
.sticker:after
{
    border-radius:15px 45px;
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient( rgba(255, 255, 0, .5), rgba(255, 138, 36, .5) );
    z-index: -1;
    transition: all 3s  cubic-bezier(.17,.67,.04,1);
    opacity:0;
}
 
.sticker:hover:after
{
    opacity: 1;
}
 
.sticker:hover
{
    bottom: 10px;
    transform: rotate(360deg);
    cursor: pointer;
}
 
.textInsideStickerBottom
{
    display: inline-block;
    font-weight: bold;
    font-size: 20px;
    margin-top: 40px;
}
 
@media  print
{
    .sticker
    {
        background: #ffffff;
        border: 3px solid #9333bf;
    }
 
    .textInsideStickerBottom
    {
        display: inline-block;
        margin-top: 0;
        margin-bottom: 50px;
        color: #000000;
    }
 
    .textInsideStickerTop
    {display: none;}
}
 
@media only screen and (max-width: 1000px)
{
    .backInvisibleHouseCommodityList
    {
        float: left;
        width:  100%;
        max-width: 685px;
        min-width: 515px;
    }
 
    .toBuyLabel
    {
        width: 100%;
        max-width: 685px;
        min-width: 515px;
    }
 
    .toBuyProducts
    {
        display: block;
        max-width: 685px;
        min-width: 515px;
    }
 
    .alreadyBoughtProd
    {
        display: block;
        max-width:685px;
        min-width: 515px;
    }
}
 
@media only screen and (max-width: 720px)
{
    .backInvisibleHouseCommoditiesInfo
    {
        display: block;
        width:  100%;
        max-width: 685px;
        min-width: 515px;
        border: 2px solid green;
    }
 
    .backProductInfo
    {
        display: block;
        width:100%;
        min-width: 515px;
    }
 
    .backVisibleTextAreaAndAddButt
    {
        display: block;
        width:100%;
        min-width: 515px;
    }
 
 
 
    /*.subtractProdButt*/
    /*{*/
        /*margin-left:5%;*/
    /*}*/
 
    .addProdButt
    {
 
    }
 
    .boughtButt
    {
        margin-left:10%;
        margin-right: 0;
        box-sizing: border-box;
        width:122px;
    }
 
    .deleteButt
    {
 
    }
}
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
31.01.2017, 19:23
Помогаю со студенческими работами здесь

<div> перекрывает 2 других <div>. Не отображается <div>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt; &lt;html...

Приоритет на растяжение
Приветствую уважаемые форумчане. Имеются два блока рядом стоящие по горизонтали. Два они динамично растягиваются, как у одного так и у...

Растяжение картинок
Как сделать, чтобы картинка, даже правильнее будет не растягивалась, а сжималась по ширине так, чтобы начиналась и заканчивалась в окне без...

Растяжение блока
Доброго времени суток! вопрос - есть небольшой блок &lt;div id=&quot;nav-header&quot;&gt; &lt;div class=&quot;section group&quot;&gt; &lt;div...

Растяжение изображений FlexBox
Почему растягиваются? не встают в ряд... &lt;!DOCTYPE html&gt; &lt;html lang=&quot;en&quot;&gt; &lt;head&gt; &lt;meta charset=&quot;UTF-8&quot;&gt; ...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
6
Ответ Создать тему
Новые блоги и статьи
Сумматор с применением элементов трёх состояний.
Hrethgir 26.03.2026
Тут. https:/ / fips. ru/ EGD/ ab3c85c8-836d-4866-871b-c2f0c5d77fbc Первый документ красиво выглядит, но без схемы. Это конечно не даёт никаких плюсов автору, но тем не менее. . . всё может быть. . .
Автозаполнение реквизитов при создании документа
Maks 26.03.2026
Код из решения ниже размещается в модуле объекта документа, в процедуре "ПриСозданииНаСервере". Алгоритм проверки заполнения реализован для исключения перезаписи значения реквизита, которое может. . .
Команды "Заполнить" и "Очистить" на форме документа
Maks 26.03.2026
1. Команда формы "ЗаполнитьЗапчасти". На примере нетипового документа разработанного в конфигурации КА2. В качестве источника данных указан регистр накопления, в который записываются данные о. . .
Кому нужен AOT?
DevAlt 26.03.2026
Решил сделать простой ланчер Написал заготовку: dotnet new console --aot -o UrlHandler var items = args. Split(":"); var tag = items; var id = items; var executable = args;. . .
Отправка уведомления на почту при изменении наименования справочника
Maks 24.03.2026
Программная отправка письма электронной почты на примере изменения наименования типового справочника "Склады" в конфигурации БП3. Перед реализацией необходимо выполнить настройку системной учетной. . .
модель ЗдравоСохранения 5. Меньше увольнений- больше дохода!
anaschu 24.03.2026
Теперь система здравосохранения уменьшает количество увольнений. 9TO2GP2bpX4 a42b81fb172ffc12ca589c7898261ccb/ https:/ / rutube. ru/ video/ a42b81fb172ffc12ca589c7898261ccb/ Слева синяя линия -. . .
Midnight Chicago Blues
kumehtar 24.03.2026
Такой Midnight Chicago Blues, знаешь?. . Когда вечерние улицы становятся ночными, а ты не можешь уснуть. Ты идёшь в любимый старый бар, и бармен наливает тебе виски. Ты смотришь на пролетающие. . .
SDL3 для Desktop (MinGW): Вывод текста со шрифтом TTF с помощью библиотеки SDL3_ttf на Си и C++
8Observer8 24.03.2026
Содержание блога Финальные проекты на Си и на C++: finish-text-sdl3-c. zip finish-text-sdl3-cpp. zip
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru