is awesome! (when “width: 100%” not working)

-is-awesome!-(when--“width:-100%”-not-working)

Dudes.

Sometimes you want your to fit its “parent” with dynamic width and you do it like this:

 type="text" style="width: 100%">

But, that “parent” could be smaller then 150px (which is ‘s default min-width) and your goes beyond the borders.

The solution is simple — just add size="1" like this:

 type="text" size="1" style="width: 100%">

That’s all!

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post
seven-priorities-for-project-managers-in-2023

Seven Priorities for Project Managers in 2023

Next Post
how-to-write-to-workflow-job-summary-from-a-github-action

How to Write to Workflow Job Summary from a GitHub Action

Related Posts
irremote-程式庫搭配-adafruit-neopoxel-程式庫的問題

IRRemote 程式庫搭配 Adafruit_NeoPoxel 程式庫的問題

IRremote 是大家使用紅外線遙控實驗最常用的程式庫,由於接收紅外線遙控器訊號與時間極度相關,如果你的程式中有耗時較久的動作,就可能會影響到紅外線訊號接收的正確性。舉例來說,像是大家愛用的 WS2812B 燈串,串接越多顆燈,傳輸所有燈顏色的資料所耗的時間就越久,以底下這個採用 Adafruit_NeoPixel 程式庫顯示呼吸燈效果的程式為例: #include #include #include #define DECODE_NEC Adafruit_NeoPixel leds=Adafruit_NeoPixel(16, 7); void setup() { Serial.begin(115200);…
Read More