Ecommerce Shopify WordPress Discussion

HTML input control value disappears when add PADDING

I need CSS help on formatting this BID VALUE text box (input element) (See in Picture 1) Picture 1 Product link is here When I make text box wider via Padding the text value inside the box is disappearing (Get hidden probably) I can't find where I'm doing wrong. I have duplicated them so you can understand my problem, If you look on the photo above I have labeled Number 1 & 2, they both have same ID and other properties BUT BID VALUE Number 1 have the following custom CSS input[name="bid_value"] { width:auto; padding: 4px 120px 5px 31px; margin: 2px 11px; box-sizing: border-box; text-align: left; } BID VALUE Number 2 doesn't have any custom CSS its by default that way, It does not show the current BID VALUES clear (all value figures) that's why I want it to be a little big but if i do that (referring BID VALUE 1) the value is disappearing, Any advice on where I'm doing wrong? I wish my BID VALUE text box above to be like this format here in Picture 2 Its link is here Looking forward to hear from you guys on what I am doing wrong.
If you insist on using width: auto, add !important to overwrite existing CSS (i.e. width: 3.631em; in a rule for .woocommerce .quantity .qty), otherwise your padding will fill the whole input field.

December 29, 2023

If the L/R (width) padding leaves no room for the text at the chosen font size, the text will not be displayed. const $ = document.querySelector.bind(document); let pwid = 10; $('button').addEventListener('click', () => { pwid = pwid += 20; $('input').style.paddingLeft = `${pwid}px`; $('input').style.paddingRight = `${pwid}px`; $('aside').innerHTML = `Control Width: 130px<br>L/R Padding: ${pwid}px`; }); input{width:130px;padding:10px;box-sizing:border-box;margin-bottom:20px;} button{padding:7px 10px;background:#ccc;border:1px solid #ccccccCC;border-radius:4px;cursor:pointer;} <input type="text" value="Merry Christmas" /> <div><button>Add 20px to Padding Width</button></div> <aside></aside> Run code snippetExpand snippet Solution: Use font-size instead of padding to make the text easier to see. If the input field is not growing with the text, then change the width and/or max-width values on the input (text) box to be either "auto" or "unset".

December 29, 2023

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.