Jak ustawić stałą szerokość elementów w flexbox?

0

Witam mam problem z ustawieniem rozmiaru, elementy mi się zwiększają mimo, że mają mieć stały rozmiar

Na pierwszym zdjęciu są normalne, po dodaniu parunastu zmniejszają się

bbbb.jpgbbbb2.jpgbbbb3.jpg

0

daj to chociaż w tekście, żeby się dało skopiować,
generalnie kombinuj z flex-shrink: 0 dla elementów i overflow: auto w parencie

0
dzek69 napisał(a):

daj to chociaż w tekście, żeby się dało skopiować,
generalnie kombinuj z flex-shrink: 0 dla elementów i overflow: auto w parencie

*{outline:none;}.html_text{display:flex;align-self:center;justify-self:center;position:absolute;width:98vw;height:95vh;}.settings_div{display:flex;flex-direction:row;height:8vh;width:99%;}.settings_div *{display:flex;height:99%;align-items:center;justify-content:center;}.main_att_class{display:flex;flex-direction:column;position:absolute;width:98vw;height:98vh;align-items:center;margin-top:4px;}.att_div_class{display:flex;flex-direction:row;height:26px;width:250px;margin-bottom:2px;align-items:center;justify-content:center;}.att_div_class select{display:flex;flex-direction:row;height:26px;width:248px;cursor:pointer;}.att_div_class button{display:flex;flex-direction:row;align-items:center;justify-content:center;margin-left:2px;width:45px;height:94%;cursor:pointer;}.att_div_full_class{display:flex;align-items:center;justify-content:center;height:99%;width:99%;}.att_div_full_class textarea{display:flex;height:98%;width:98%;}.style_field *{margin-right:2px;}.styles_names{display:flex;flex-direction:row;width:calc((100% - 75px) / 2);}.styles_values{display:flex;flex-direction:row;width:calc((100% - 75px) / 2);}.style_field button{display:flex;width:26px;align-items:center;justify-content:center;cursor:pointer;}

html{display:flex;flex-direction:column;position:absolute;margin:0%;padding:0%;width:100vw;height:100vh;overflow:hidden;}

body{display:flex;flex-direction:column;position:absolute;margin:0%;padding:4px;width:100vw;height:100vh;align-items:center;justify-content:flex-start;overflow-x:hidden;}

.style_field{display:flex;flex-direction:row;width:95vw;height:27px;margin:2px;justify-content:center;align-self:center;justify-self:start;}
<body>
<div class="style_field">

   <input class="styles_names" list="style_names_id" value="border" onchange="this.nextElementSibling.nextElementSibling.value='';window.top.sprawdzWprowadzonyStyl(this);" spellcheck="false">

<button class="clear_style_field" onclick="this.previousElementSibling.value='';this.nextElementSibling.value='';">
</button>

<input value="1px solid blue" class="styles_values" spellcheck="false" oninput="window.top.ramka_okna_ustawien_x.target.ownerDocument.defaultView.TablicaStyluClassX.updateStyle();
window.top.generujStylHTML();">

<button class="clear_style_field" onclick="this.previousElementSibling.value='';">-</button>

<button class="remove_style_field" onclick="this.parentNode.remove();window.top.ramka_okna_ustawien_x.target.ownerDocument.defaultView.TablicaStyluClassX.updateStyle();window.top.generujStylHTML();">x</button></div>

</body>

overflow:auto; w parencie odpada, jakimś cudem mi się belka dolna pojawia do przewijania.

1

no to overflow-y: auto

0
dzek69 napisał(a):

no to overflow-y: auto

Dobra działa

dałem tak

.style_field input{margin-right:2px;height:20px;}
.style_field button{margin-right:2px;height:24px;}
0

Wie ktoś czemu to nie działa?

bbbb.jpg

I co może być jak mi alert(this); nie działa?

Albo jak mi skippuje alert(window.top); ? (Żadnego komunikatu)

0
johnny_Be_good napisał(a):

I co może być jak mi alert(this); nie działa?

Albo jak mi skippuje alert(window.top); ? (Żadnego komunikatu)

Użyj console.log i czytaj w Inspektorze. To zawsze działa.

0

Najedź kursorem na to czerwone i czytaj 🤦

1 użytkowników online, w tym zalogowanych: 0, gości: 1