As the title suggests, I want my date field to have the same padding etc as my text field.
How can I do this?
How can I do this?
Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!
Hey there,As the title suggests, I want my date field to have the same padding etc as my text field.
How can I do this?
#dob {
padding: 10px;
}
Yeah that looks okay, but doesn't work on iphone...Hey there,
On my phone so might not be able to provide the best answer. But in your CSS you can specify the selector as your ID value in your HTML.
For example:
CSS:#dob { padding: 10px; }
How so?Yeah that looks okay, but doesn't work on iphone...
It's as wide as the day,month, year inputs require. Everything else is the width of the screen with padding.How so?
Hmm, try this:It's as wide as the day,month, year inputs require. Everything else is the width of the screen with padding.
input[type="text"],
input[type="date"] {
padding: 1rem;
outline: none;
border: solid 1px #000;
}
Code Forum is a community platform where coding enthusiasts can connect with other developers, engage in discussions, ask for help, and share their knowledge with a supportive community. It's a perfect place to improve your coding skills and to find a community of like-minded individuals who share your passion for coding.
We use essential cookies to make this site work, and optional cookies to enhance your experience.